How to set nbruttsineachrecurrentiter for reader in python?
I used to train my model using BrainScript, the configuration of the reader was like:
reader=[
...
frameMode=false
nbruttsineachrecurrentiter=64
...
]
So, while using python how do I set nbruttsineachrecurrentiter for the reader?
reader = MinibatchSource(deserializers, randomize=true, truncation_length=donotknow)
I need to set truncation_length, right? But I thought the truncation_length should be equal to mbSize.
Thanks.
Let me double check - you are using BPTT mode, correct? truncation=true in the brain script config?
@eldakms yea, I'm using truncated BPTT.
In brain script, BPTT was inconsistent with frame and utterance mode, mbsize was actually a truncation length and nbruttsineachrecurrentiter specified how many parallel sequences you want to pack in the minibatch. So the real size of the minibatch in samples was mbsize * nbruttsineachrecurrentiter.
Let's say you specify mbSize = 16, nbruttsineachrecurrentiter = 128, in total 2048 samples per minibatch.
In V2, python or the new configuration (with deserializers) we made BPTT consistent with frame mode and utterance mode: mbSize is always the total size of the minibatch in samples truncationLength is the truncation length
So for the sample above you have to specify mbSize = 2048, truncationLength = 16. nbruttsineachrecurrentiter is removed completely.
Hope this makes it clear. Thanks!
@eldakms Many thanks!