Onnx forward error

@berak I fixed my problem by changing my code for converting. previouly, I used dynamic_axes as this

    torch.onnx.export(model,  # model being run
                      generated_input,  # model input (or a tuple for multiple inputs)
                      args.output_path,  # where to save the model (can be a file or file-like object)
                      # export_params=True,  # store the trained parameter weights inside the model file
                      opset_version=11,  # the ONNX version to export the model to
                      verbose=False,
                      do_constant_folding=True,  # whether to execute constant folding for optimization
                      input_names=['input'],  # the model's input names
                      output_names=['output'],  # the model's output names
                      dynamic_axes={'input': {0: 'batch_size'},  # variable length axes
                                    'output': {0: 'batch_size'}}
                      )

Later I canceled dynamic_axes. That fixed my problem.

1 Like