Don't have an op for aten::uniform but it isn't a special case

Using tensorwatch (0.9.1) to draw network:

tw.draw_model(net, (1, 3, 512, 512))

PyTorch(1.5.1), torchvision(0.6.1)


RuntimeError Traceback (most recent call last)
in
----> 1 tw.draw_model(net, (1, 3, 512, 512))

g:\medicine\winvenv\lib\site-packages\tensorwatch_init_.py in draw_model(model, input_shape, orientation, png_filename)
33 def draw_model(model, input_shape=None, orientation=‘TB’, png_filename=None): #orientation = ‘LR’ for landscpe
34 from .model_graph.hiddenlayer import pytorch_draw_model
—> 35 g = pytorch_draw_model.draw_graph(model, input_shape)
36 return g
37

g:\medicine\winvenv\lib\site-packages\tensorwatch\model_graph\hiddenlayer\pytorch_draw_model.py in draw_graph(model, args)
33 args = torch.ones(args)
34
—> 35 dot = draw_img_classifier(model, args)
36 return DotWrapper(dot)
37

g:\medicine\winvenv\lib\site-packages\tensorwatch\model_graph\hiddenlayer\pytorch_draw_model.py in draw_img_classifier(model, dataset, display_param_nodes, rankdir, styles, input_shape)
61 try:
62 non_para_model = distiller.make_non_parallel_copy(model)
—> 63 g = SummaryGraph(non_para_model, dummy_input)
64
65 return sgraph2dot(g, display_param_nodes, rankdir, styles)

g:\medicine\winvenv\lib\site-packages\tensorwatch\model_graph\hiddenlayer\summary_graph.py in init(self, model, dummy_input, apply_scope_name_workarounds)
94 nodes = graph.nodes()
95 elif hasattr(jit, ‘_get_trace_graph’):
—> 96 trace, _ = jit._get_trace_graph(model_clone, dummy_input, _force_outplace=True)
97 graph = trace
98 nodes = graph.nodes()

g:\medicine\winvenv\lib\site-packages\torch\jit_init_.py in _get_trace_graph(f, args, kwargs, _force_outplace, return_inputs, _return_inputs_states)
276 if not isinstance(args, tuple):
277 args = (args,)
–> 278 outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
279 return outs
280

g:\medicine\winvenv\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
548 result = self._slow_forward(*input, **kwargs)
549 else:
–> 550 result = self.forward(*input, **kwargs)
551 for hook in self._forward_hooks.values():
552 hook_result = hook(self, input, result)

g:\medicine\winvenv\lib\site-packages\torch\jit_init_.py in forward(self, *args)
359 in_vars + module_state,
360 _create_interpreter_name_lookup_fn(),
–> 361 self._force_outplace,
362 )
363

RuntimeError: 0 INTERNAL ASSERT FAILED at …\torch\csrc\jit\ir\alias_analysis.cpp:318, please report a bug to PyTorch. We don’t have an op for aten::uniform but it isn’t a special case. Argument types: Tensor, float, float, None,

Could you create an issue on GitHub so that we could track it, please?
Would it be possible to provide a minimal code snippet to reproduce this issue?

Pardon me, I cannot replicate the errors on my project.
I changed the model structure, recreate the virtualenv envrionment, then I run the jupyter-notebook a few seconds ago and got all thing worked right, the model could be visualized, displaed on jupyter-notebook or saved as .png format on my disk.
I’m not sure whether there was wrong with the installation of pytorch or flaws existed in the model at that time.
But I’m sure the torchsummary could be executed to display the network channels and sizes any time.

As the problem disappeared, shall I create an issue on GitHub?

I don’t think it would be helpful, if you (and thus we) cannot reproduce it.
In case you are running into this issue again and can reproduce it, please create an issue. :wink: