Skip to content

what is the role of 'maxlen' parameter? #55

@amirj

Description

@amirj

'maxlen' is one of the parameters in 'train_nmt.py', set to 50 by default.
I get the following message during the training process: "Minibatch with zero sample under length 100"
Investigating the source code shows that this message is appear when there is a batch size that the length of the source and target is greater than 'maxlen'.
On the other hand, in 'data_iterator.py' training samples have been skipped when the length of source and target is greater than 'maxlen'.

  1. Why such a contradiction is exist? -passing samples in data_iterator and then filter them in 'prpare-data'
  2. If I set maxlen to a large value (1000 for example), the updating time is significantly increase, would you describe why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions