I am trying to use NasNet to do feature extraction for an OCR use case.
However after like 2300 steps I have the following error:

…
File “C:\Users\tryck\Documents\OCR_from_scratch\model_custom\NasNet_layers.py”, line 159, in forward
comb_iter_1 = comb_iter_1_left + comb_iter_1_right
RuntimeError: The size of tensor a (16) must match the size of tensor b (9) at non-singleton dimension 0

My code is deterministic I set a seed and deactivate non deterministic cuda calculation.
The error is always the same but do not always appear at the same step.
What should I do to be able to solve this issue ?