symbolic for max_pool2d_with_indices returned None for the output 1 (indicating conversion for that particular output is not supported), but the network uses this output later
See original GitHub issueHi,
I am getting this error while adding a graph. Following is the stack trace
`--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-43-d96358ad8344> in <module>() 21 use_last_checkpoint =train_params[‘use_last_checkpoint’]) 22 —> 23 solver.train(train_loader, val_loader)
~/shayan/quickNat_pytorch/quickNat_pytorch/solver.py in train(self, train_loader, val_loader) 140 self.logWriter.update_cm_per_iter(output, y, phase) 141 –> 142 self.logWriter.graph(model, X, phase) 143 del X, y, w, output, loss 144 torch.cuda.empty_cache()
~/shayan/quickNat_pytorch/quickNat_pytorch/log_utils.py in graph(self, model, X, phase) 79 80 def graph(self, model, X, phase): —> 81 self.writer[phase].add_graph(model, X) 82 83 def update_cm_per_iter(self, predictions, correct_labels, phase):
~/anaconda3/lib/python3.6/site-packages/tensorboardX/writer.py in add_graph(self, model, input_to_model, verbose, **kwargs) 518 print(‘add_graph() only supports PyTorch v0.2.’) 519 return –> 520 self.file_writer.add_graph(graph(model, input_to_model, verbose)) 521 except AttributeError: 522 # Caffe2 models do not have the ‘forward’ method
~/anaconda3/lib/python3.6/site-packages/tensorboardX/pytorch_graph.py in graph(model, args, verbose) 94 return GraphDef(versions=VersionDef(producer=22)) 95 if LooseVersion(torch.version) >= LooseVersion(“0.4.1”): —> 96 torch.onnx._optimize_trace(trace, torch._C._onnx.OperatorExportTypes.ONNX_ATEN_FALLBACK) 97 elif LooseVersion(torch.version) >= LooseVersion(“0.4”): 98 torch.onnx._optimize_trace(trace, False)
~/anaconda3/lib/python3.6/site-packages/torch/onnx/init.py in _optimize_trace(trace, operator_export_type) 39 def _optimize_trace(trace, operator_export_type): 40 from torch.onnx import utils —> 41 trace.set_graph(utils._optimize_graph(trace.graph(), operator_export_type)) 42 43
~/anaconda3/lib/python3.6/site-packages/torch/onnx/utils.py in _optimize_graph(graph, operator_export_type) 105 torch._C._jit_pass_lint(graph) 106 if operator_export_type != OperatorExportTypes.RAW: –> 107 graph = torch._C._jit_pass_onnx(graph, operator_export_type) 108 torch._C._jit_pass_lint(graph) 109 torch._C._jit_pass_onnx_peephole(graph)`
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Thanks for the suggestion. WIll try and get back to you.
@Kzernobog @YiruS You can force the writer to flush with writer.close() or writer.flush() in tensorboardX v 1.8