Skip to content

I can reproduce the repo's result by reduce the positive samples. #17

Open
@255-1

Description

@255-1

I try many times to repeat the result, but my binary_accuracy always 50%, it's horrible. then i find that an issue mention that the positive_sample is the half of batch_size. I know that the number of negative samples are important to make NCELoss approximate the max-likelyhood estimation.so I change the train_model function of the "train_model.py".set positive_samples=1,

train_model

train_data = SortedNumberGenerator(batch_size=batch_size, subset='train', terms=terms,
positive_samples=1, predict_terms=predict_terms,
image_size=image_size, color=color, rescale=True)
validation_data = SortedNumberGenerator(batch_size=batch_size, subset='valid', terms=terms,
positive_samples=1, predict_terms=predict_terms,
image_size=image_size, color=color, rescale=True)

then I got 96% binary_accuracy at the first epoch. Yep!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions