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

username: brifuture
cooked: <p>Using tensorwatch (0.9.1) to draw network:</p>
<pre><code class="lang-auto">tw.draw_model(net, (1, 3, 512, 512))
</code></pre>
<p>PyTorch(1.5.1), torchvision(0.6.1)</p>
<hr>
<p>RuntimeError                              Traceback (most recent call last)<br>
 in <br>
----&gt; 1 tw.draw_model(net, (1, 3, 512, 512))</p>
<p>g:\medicine\winvenv\lib\site-packages\tensorwatch_<em>init</em>_.py in draw_model(model, input_shape, orientation, png_filename)<br>
33 def draw_model(model, input_shape=None, orientation=‘TB’, png_filename=None): <span class="hashtag">#orientation</span> = ‘LR’ for landscpe<br>
34     from .model_graph.hiddenlayer import pytorch_draw_model<br>
—&gt; 35     g = pytorch_draw_model.draw_graph(model, input_shape)<br>
36     return g<br>
37</p>
<p>g:\medicine\winvenv\lib\site-packages\tensorwatch\model_graph\hiddenlayer\pytorch_draw_model.py in draw_graph(model, args)<br>
33         args = torch.ones(args)<br>
34<br>
—&gt; 35     dot = draw_img_classifier(model, args)<br>
36     return DotWrapper(dot)<br>
37</p>
<p>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)<br>
61     try:<br>
62         non_para_model = distiller.make_non_parallel_copy(model)<br>
—&gt; 63         g = SummaryGraph(non_para_model, dummy_input)<br>
64<br>
65         return sgraph2dot(g, display_param_nodes, rankdir, styles)</p>
<p>g:\medicine\winvenv\lib\site-packages\tensorwatch\model_graph\hiddenlayer\summary_graph.py in <strong>init</strong>(self, model, dummy_input, apply_scope_name_workarounds)<br>
94                 nodes = graph.nodes()<br>
95             elif hasattr(jit, ‘_get_trace_graph’):<br>
—&gt; 96                 trace, _ = jit._get_trace_graph(model_clone, dummy_input, _force_outplace=True)<br>
97                 graph = trace<br>
98                 nodes = graph.nodes()</p>
<p>g:\medicine\winvenv\lib\site-packages\torch\jit_<em>init</em>_.py in _get_trace_graph(f, args, kwargs, _force_outplace, return_inputs, _return_inputs_states)<br>
276     if not isinstance(args, tuple):<br>
277         args = (args,)<br>
–&gt; 278     outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)<br>
279     return outs<br>
280</p>
<p>g:\medicine\winvenv\lib\site-packages\torch\nn\modules\module.py in <strong>call</strong>(self, *input, **kwargs)<br>
548             result = self._slow_forward(*input, **kwargs)<br>
549         else:<br>
–&gt; 550             result = self.forward(*input, **kwargs)<br>
551         for hook in self._forward_hooks.values():<br>
552             hook_result = hook(self, input, result)</p>
<p>g:\medicine\winvenv\lib\site-packages\torch\jit_<em>init</em>_.py in forward(self, *args)<br>
359             in_vars + module_state,<br>
360             _create_interpreter_name_lookup_fn(),<br>
–&gt; 361             self._force_outplace,<br>
362         )<br>
363</p>
<p>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,</p>

username: ptrblck
cooked: <p>Could you create an issue on <a href="https://github.com/pytorch/pytorch/issues">GitHub</a> so that we could track it, please?<br>
Would it be possible to provide a minimal code snippet to reproduce this issue?</p>

username: brifuture
cooked: <p>Pardon me, I cannot replicate the errors on my project.<br>
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 <code>.png</code> format on my disk.<br>
I’m not sure whether there was wrong with the installation of <code>pytorch</code> or flaws existed in the model at that time.<br>
But I’m sure the <code>torchsummary</code> could be executed to display the network channels and sizes any time.</p>
<p>As the problem disappeared, shall I create an issue on GitHub?</p>

username: ptrblck
cooked: <aside class="quote no-group" data-username="brifuture" data-post="3" data-topic="88313">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/brifuture/48/17220_2.png" class="avatar"> brifuture:</div>
<blockquote>
<p>As the problem disappeared, shall I create an issue on GitHub?</p>
</blockquote>
</aside>
<p>I don’t think it would be helpful, if you (and thus we) cannot reproduce it.<br>
In case you are running into this issue again and can reproduce it, please create an issue. <img src="https://discuss.pytorch.org/images/emoji/apple/wink.png?v=12" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p>