You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the following error when {{trainer.fit(nmt_model)}}
`TypeError Traceback (most recent call last)
in ()
1 # start model training
----> 2 trainer.fit(nmt_model)
16 frames
/usr/local/lib/python3.7/dist-packages/nemo/core/classes/common.py in _attach_and_validate_output_types(self, out_objects, ignore_collections, output_types)
282 "or the provided NeuralTypes {} should enable container support "
283 "(add '[]' to the NeuralType definition)".format(
--> 284 len(out_container), len(output_types), output_types
285 )
286 )
TypeError: Number of output arguments provided (4) is not as expected (3).
This can be either because insufficient number of output NeuralTypes were provided,or the provided NeuralTypes {'loss': NeuralType(axis=(), element_type=LossType), 'decoder_hidden_states': NeuralType(axis=(batch, time, dimension), element_type=ChannelType, optional=True), 'encoder_hidden_states': NeuralType(axis=(batch, time, dimension), element_type=ChannelType, optional=True)} should enable container support (add '[]' to the NeuralType definition)`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello there, I have been following the Text2Sparql example on https://github.com/NVIDIA/NeMo/blob/main/tutorials/nlp/Neural_Machine_Translation-Text2Sparql.ipynb.
I got the following error when {{trainer.fit(nmt_model)}}
`TypeError Traceback (most recent call last)
in ()
1 # start model training
----> 2 trainer.fit(nmt_model)
16 frames
/usr/local/lib/python3.7/dist-packages/nemo/core/classes/common.py in _attach_and_validate_output_types(self, out_objects, ignore_collections, output_types)
282 "or the provided NeuralTypes {} should enable container support "
283 "(add '[]' to the NeuralType definition)".format(
--> 284 len(out_container), len(output_types), output_types
285 )
286 )
TypeError: Number of output arguments provided (4) is not as expected (3).
This can be either because insufficient number of output NeuralTypes were provided,or the provided NeuralTypes {'loss': NeuralType(axis=(), element_type=LossType), 'decoder_hidden_states': NeuralType(axis=(batch, time, dimension), element_type=ChannelType, optional=True), 'encoder_hidden_states': NeuralType(axis=(batch, time, dimension), element_type=ChannelType, optional=True)} should enable container support (add '[]' to the NeuralType definition)`
Here is the model:
NeuralMachineTranslationModel.txt
Beta Was this translation helpful? Give feedback.
All reactions