---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-33-a9d25627b347> in <module>()
10 # Export the trained model to ONNX
11 dummy_input = Variable(torch.randn(1, 1, 28, 28)) # one black and white 28 x 28 picture will be the input to the model
---> 12 torch.onnx.export(trained_model, dummy_input, "sentiment.onnx")
9 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
529 tracing_state._traced_module_stack.append(self)
530 try:
--> 531 result = self.forward(*input, **kwargs)
532 finally:
533 tracing_state.pop_scope()
TypeError: forward() missing 1 required positional argument: 'hidden'
----------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-34-a405ea78dbb6> in <module>()
1
----> 2 import onnx
3 import warnings
4 from onnx_tf.backend import prepare
5
ModuleNotFoundError: No module named 'onnx'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------