Skip to content

About the use of customized arithmetic data #4

Open
@Alexwangziyu

Description

@Alexwangziyu

I nothiced during training and evaluation, the code just calculates c by reading a and b. for example I use "10 + 1 = 10" to train and test the model, for training the generate_data_str() function in evaluate_addition_batch() will return "10+1=10", which is good. But for testing, generate_data_str() function will only return "10+1=" and then get_abc_new() will be called to parse the "10+1=".

Cause "10+1=" does not contain c, get_abc_new() actually use int(a)+int(b) to calculate c, which is different with my test data!

If I want to define a new arithmetic, I need to modify the code, right? I'm really hoping to get some help from the authors because I've spent hours modifying train_util.py, but I'm still not sure if I have modified it correctly.

I'd appreciate it if you could give me some guidance. Thank you so much! (I'm only working on plain and reverse)

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