<h2 dir="auto"><g-emoji class="g-emoji" alias="question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2753.png">❓</g-emoji> Questions and Help</h2>
<p dir="auto">I want to convert a custom layer to onnx format in pytorch 1.1.0. But I get an error<br>
<code class="notranslate">RuntimeError: tuple appears in op that does not forward tuples</code>.</p>
<p dir="auto">But in pytorch 0.4.1 it works.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">My code to reproduce the error:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch


class CustomFunction(torch.autograd.Function):
    @staticmethod
    def symbolic(g, input):
        return g.op('Custom', input, outputs=2)

    @staticmethod
    def forward(ctx, input):
        return input, input

    
class Custom(torch.nn.Module):

    def forward(self, input):
        return CustomFunction.apply(input)
    
model = Custom()
batch = torch.FloatTensor(1, 3)
torch.onnx.export(model, batch, &quot;test.onnx&quot;, verbose=True)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span>


<span class="pl-k">class</span> <span class="pl-v">CustomFunction</span>(<span class="pl-s1">torch</span>.<span class="pl-s1">autograd</span>.<span class="pl-v">Function</span>):
    <span class="pl-en">@<span class="pl-s1">staticmethod</span></span>
    <span class="pl-k">def</span> <span class="pl-en">symbolic</span>(<span class="pl-s1">g</span>, <span class="pl-s1">input</span>):
        <span class="pl-k">return</span> <span class="pl-s1">g</span>.<span class="pl-en">op</span>(<span class="pl-s">'Custom'</span>, <span class="pl-s1">input</span>, <span class="pl-s1">outputs</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)

    <span class="pl-en">@<span class="pl-s1">staticmethod</span></span>
    <span class="pl-k">def</span> <span class="pl-en">forward</span>(<span class="pl-s1">ctx</span>, <span class="pl-s1">input</span>):
        <span class="pl-k">return</span> <span class="pl-s1">input</span>, <span class="pl-s1">input</span>

    
<span class="pl-k">class</span> <span class="pl-v">Custom</span>(<span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-v">Module</span>):

    <span class="pl-k">def</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>):
        <span class="pl-k">return</span> <span class="pl-v">CustomFunction</span>.<span class="pl-en">apply</span>(<span class="pl-s1">input</span>)
    
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">Custom</span>()
<span class="pl-s1">batch</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">FloatTensor</span>(<span class="pl-c1">1</span>, <span class="pl-c1">3</span>)
<span class="pl-s1">torch</span>.<span class="pl-s1">onnx</span>.<span class="pl-en">export</span>(<span class="pl-s1">model</span>, <span class="pl-s1">batch</span>, <span class="pl-s">"test.onnx"</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div>
<h2 dir="auto">Expected behavior</h2>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
&lt;ipython-input-7-6ff6d6df1bca&gt; in &lt;module&gt;
     19 model = Custom()
     20 batch = torch.FloatTensor(1, 3)
---&gt; 21 torch.onnx.export(model, batch, &quot;test.onnx&quot;, verbose=True)

~/anaconda3/lib/python3.7/site-packages/torch/onnx/__init__.py in export(*args, **kwargs)
     23 def export(*args, **kwargs):
     24     from torch.onnx import utils
---&gt; 25     return utils.export(*args, **kwargs)
     26 
     27 

~/anaconda3/lib/python3.7/site-packages/torch/onnx/utils.py in export(model, args, f, export_params, verbose, training, input_names, output_names, aten, export_raw_ir, operator_export_type, opset_version, _retain_param_name, do_constant_folding, strip_doc_string)
    129             operator_export_type=operator_export_type, opset_version=opset_version,
    130             _retain_param_name=_retain_param_name, do_constant_folding=do_constant_folding,
--&gt; 131             strip_doc_string=strip_doc_string)
    132 
    133 

~/anaconda3/lib/python3.7/site-packages/torch/onnx/utils.py in _export(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, export_type, example_outputs, propagate, opset_version, _retain_param_name, do_constant_folding, strip_doc_string)
    361                                                         output_names, operator_export_type,
    362                                                         example_outputs, propagate,
--&gt; 363                                                         _retain_param_name, do_constant_folding)
    364 
    365         # TODO: Don't allocate a in-memory string for the protobuf

~/anaconda3/lib/python3.7/site-packages/torch/onnx/utils.py in _model_to_graph(model, args, verbose, training, input_names, output_names, operator_export_type, example_outputs, propagate, _retain_param_name, do_constant_folding, _disable_torch_constant_prop)
    276 
    277     graph = _optimize_graph(graph, operator_export_type,
--&gt; 278                             _disable_torch_constant_prop=_disable_torch_constant_prop)
    279 
    280     # NB: ONNX requires complete information about output types, which might be

~/anaconda3/lib/python3.7/site-packages/torch/onnx/utils.py in _optimize_graph(graph, operator_export_type, _disable_torch_constant_prop)
    181     torch._C._jit_pass_erase_number_types(graph)
    182     # onnx does not support tuples, so try to remove them
--&gt; 183     torch._C._jit_pass_lower_all_tuples(graph)
    184     torch._C._jit_pass_peephole(graph, True)
    185     torch._C._jit_pass_lint(graph)

RuntimeError: tuple appears in op that does not forward tuples (VisitNode at /pytorch/torch/csrc/jit/passes/lower_tuples.cpp:117)
frame #0: std::function&lt;std::string ()&gt;::operator()() const + 0x11 (0x7f9b0c2b3441 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::string const&amp;) + 0x2a (0x7f9b0c2b2d7a in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #2: &lt;unknown function&gt; + 0xaf61f5 (0x7f9b0b4b41f5 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1)
frame #3: &lt;unknown function&gt; + 0xaf6464 (0x7f9b0b4b4464 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1)
frame #4: torch::jit::LowerAllTuples(std::shared_ptr&lt;torch::jit::Graph&gt;&amp;) + 0x13 (0x7f9b0b4b44a3 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1)
frame #5: &lt;unknown function&gt; + 0x3f9444 (0x7f9b4b87b444 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #6: &lt;unknown function&gt; + 0x130fac (0x7f9b4b5b2fac in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #7: _PyMethodDef_RawFastCallKeywords + 0x264 (0x564a1c09b6e4 in /home/videoanalytics/anaconda3/bin/python)
frame #8: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)
frame #9: _PyEval_EvalFrameDefault + 0x4e8c (0x564a1c0f72bc in /home/videoanalytics/anaconda3/bin/python)
frame #10: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)
frame #11: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)
frame #12: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)
frame #13: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)
frame #14: _PyFunction_FastCallKeywords + 0x325 (0x564a1c09a9c5 in /home/videoanalytics/anaconda3/bin/python)
frame #15: _PyEval_EvalFrameDefault + 0x416 (0x564a1c0f2846 in /home/videoanalytics/anaconda3/bin/python)
frame #16: _PyEval_EvalCodeWithName + 0xbb9 (0x564a1c038db9 in /home/videoanalytics/anaconda3/bin/python)
frame #17: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)
frame #18: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)
frame #19: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)
frame #20: _PyFunction_FastCallDict + 0x400 (0x564a1c039800 in /home/videoanalytics/anaconda3/bin/python)
frame #21: _PyEval_EvalFrameDefault + 0x1e20 (0x564a1c0f4250 in /home/videoanalytics/anaconda3/bin/python)
frame #22: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)
frame #23: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)
frame #24: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)
frame #25: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)
frame #26: PyEval_EvalCodeEx + 0x44 (0x564a1c0393c4 in /home/videoanalytics/anaconda3/bin/python)
frame #27: PyEval_EvalCode + 0x1c (0x564a1c0393ec in /home/videoanalytics/anaconda3/bin/python)
frame #28: &lt;unknown function&gt; + 0x1e004d (0x564a1c10204d in /home/videoanalytics/anaconda3/bin/python)
frame #29: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x564a1c09b569 in /home/videoanalytics/anaconda3/bin/python)
frame #30: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)
frame #31: _PyEval_EvalFrameDefault + 0x4755 (0x564a1c0f6b85 in /home/videoanalytics/anaconda3/bin/python)
frame #32: _PyGen_Send + 0x2a2 (0x564a1c094672 in /home/videoanalytics/anaconda3/bin/python)
frame #33: _PyEval_EvalFrameDefault + 0x1a6d (0x564a1c0f3e9d in /home/videoanalytics/anaconda3/bin/python)
frame #34: _PyGen_Send + 0x2a2 (0x564a1c094672 in /home/videoanalytics/anaconda3/bin/python)
frame #35: _PyEval_EvalFrameDefault + 0x1a6d (0x564a1c0f3e9d in /home/videoanalytics/anaconda3/bin/python)
frame #36: _PyGen_Send + 0x2a2 (0x564a1c094672 in /home/videoanalytics/anaconda3/bin/python)
frame #37: _PyMethodDef_RawFastCallKeywords + 0x8c (0x564a1c09b50c in /home/videoanalytics/anaconda3/bin/python)
frame #38: _PyMethodDescr_FastCallKeywords + 0x4f (0x564a1c09b86f in /home/videoanalytics/anaconda3/bin/python)
frame #39: _PyEval_EvalFrameDefault + 0x4c4c (0x564a1c0f707c in /home/videoanalytics/anaconda3/bin/python)
frame #40: _PyFunction_FastCallKeywords + 0xfb (0x564a1c09a79b in /home/videoanalytics/anaconda3/bin/python)
frame #41: _PyEval_EvalFrameDefault + 0x416 (0x564a1c0f2846 in /home/videoanalytics/anaconda3/bin/python)
frame #42: _PyFunction_FastCallKeywords + 0xfb (0x564a1c09a79b in /home/videoanalytics/anaconda3/bin/python)
frame #43: _PyEval_EvalFrameDefault + 0x6a0 (0x564a1c0f2ad0 in /home/videoanalytics/anaconda3/bin/python)
frame #44: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)
frame #45: _PyFunction_FastCallDict + 0x400 (0x564a1c039800 in /home/videoanalytics/anaconda3/bin/python)
frame #46: _PyObject_Call_Prepend + 0x63 (0x564a1c050c43 in /home/videoanalytics/anaconda3/bin/python)
frame #47: PyObject_Call + 0x6e (0x564a1c04595e in /home/videoanalytics/anaconda3/bin/python)
frame #48: _PyEval_EvalFrameDefault + 0x1e20 (0x564a1c0f4250 in /home/videoanalytics/anaconda3/bin/python)
frame #49: _PyEval_EvalCodeWithName + 0x5da (0x564a1c0387da in /home/videoanalytics/anaconda3/bin/python)
frame #50: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)
frame #51: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)
frame #52: &lt;unknown function&gt; + 0x171cc6 (0x564a1c093cc6 in /home/videoanalytics/anaconda3/bin/python)
frame #53: &lt;unknown function&gt; + 0x171ecb (0x564a1c093ecb in /home/videoanalytics/anaconda3/bin/python)
frame #54: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x564a1c09b569 in /home/videoanalytics/anaconda3/bin/python)
frame #55: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)
frame #56: _PyEval_EvalFrameDefault + 0x4755 (0x564a1c0f6b85 in /home/videoanalytics/anaconda3/bin/python)
frame #57: _PyEval_EvalCodeWithName + 0x5da (0x564a1c0387da in /home/videoanalytics/anaconda3/bin/python)
frame #58: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)
frame #59: _PyEval_EvalFrameDefault + 0x6a0 (0x564a1c0f2ad0 in /home/videoanalytics/anaconda3/bin/python)
frame #60: &lt;unknown function&gt; + 0x171cc6 (0x564a1c093cc6 in /home/videoanalytics/anaconda3/bin/python)
frame #61: &lt;unknown function&gt; + 0x171ecb (0x564a1c093ecb in /home/videoanalytics/anaconda3/bin/python)
frame #62: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x564a1c09b569 in /home/videoanalytics/anaconda3/bin/python)
frame #63: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)"><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">RuntimeError</span>                              <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">7</span><span class="pl-c1">-</span><span class="pl-c1">6</span><span class="pl-s1">ff6d6df1bca</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>
     <span class="pl-c1">19</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">Custom</span>()
     <span class="pl-c1">20</span> <span class="pl-s1">batch</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">FloatTensor</span>(<span class="pl-c1">1</span>, <span class="pl-c1">3</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">21</span> <span class="pl-s1">torch</span>.<span class="pl-s1">onnx</span>.<span class="pl-en">export</span>(<span class="pl-s1">model</span>, <span class="pl-s1">batch</span>, <span class="pl-s">"test.onnx"</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)

<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">anaconda3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">onnx</span><span class="pl-c1">/</span><span class="pl-s1">__init__</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">export</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
     <span class="pl-c1">23</span> <span class="pl-k">def</span> <span class="pl-en">export</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
     <span class="pl-c1">24</span>     <span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">onnx</span> <span class="pl-k">import</span> <span class="pl-s1">utils</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">25</span>     <span class="pl-s1">return</span> <span class="pl-s1">utils</span>.<span class="pl-en">export</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
     <span class="pl-c1">26</span> 
     <span class="pl-c1">27</span> 

<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">anaconda3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">onnx</span><span class="pl-c1">/</span><span class="pl-s1">utils</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">export</span>(<span class="pl-s1">model</span>, <span class="pl-s1">args</span>, <span class="pl-s1">f</span>, <span class="pl-s1">export_params</span>, <span class="pl-s1">verbose</span>, <span class="pl-s1">training</span>, <span class="pl-s1">input_names</span>, <span class="pl-s1">output_names</span>, <span class="pl-s1">aten</span>, <span class="pl-s1">export_raw_ir</span>, <span class="pl-s1">operator_export_type</span>, <span class="pl-s1">opset_version</span>, <span class="pl-s1">_retain_param_name</span>, <span class="pl-s1">do_constant_folding</span>, <span class="pl-s1">strip_doc_string</span>)
    <span class="pl-c1">129</span>             <span class="pl-s1">operator_export_type</span><span class="pl-c1">=</span><span class="pl-s1">operator_export_type</span>, <span class="pl-s1">opset_version</span><span class="pl-c1">=</span><span class="pl-s1">opset_version</span>,
    <span class="pl-c1">130</span>             <span class="pl-s1">_retain_param_name</span><span class="pl-c1">=</span><span class="pl-s1">_retain_param_name</span>, <span class="pl-s1">do_constant_folding</span><span class="pl-c1">=</span><span class="pl-s1">do_constant_folding</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">131</span>             <span class="pl-s1">strip_doc_string</span><span class="pl-c1">=</span><span class="pl-s1">strip_doc_string</span>)
    <span class="pl-c1">132</span> 
    <span class="pl-c1">133</span> 

<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">anaconda3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">onnx</span><span class="pl-c1">/</span><span class="pl-s1">utils</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_export</span>(<span class="pl-s1">model</span>, <span class="pl-s1">args</span>, <span class="pl-s1">f</span>, <span class="pl-s1">export_params</span>, <span class="pl-s1">verbose</span>, <span class="pl-s1">training</span>, <span class="pl-s1">input_names</span>, <span class="pl-s1">output_names</span>, <span class="pl-s1">operator_export_type</span>, <span class="pl-s1">export_type</span>, <span class="pl-s1">example_outputs</span>, <span class="pl-s1">propagate</span>, <span class="pl-s1">opset_version</span>, <span class="pl-s1">_retain_param_name</span>, <span class="pl-s1">do_constant_folding</span>, <span class="pl-s1">strip_doc_string</span>)
    <span class="pl-c1">361</span>                                                         <span class="pl-s1">output_names</span>, <span class="pl-s1">operator_export_type</span>,
    <span class="pl-c1">362</span>                                                         <span class="pl-s1">example_outputs</span>, <span class="pl-s1">propagate</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">363</span>                                                         <span class="pl-s1">_retain_param_name</span>, <span class="pl-s1">do_constant_folding</span>)
    <span class="pl-c1">364</span> 
    <span class="pl-c1">365</span>         <span class="pl-c"># TODO: Don't allocate a in-memory string for the protobuf</span>

<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">anaconda3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">onnx</span><span class="pl-c1">/</span><span class="pl-s1">utils</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_model_to_graph</span>(<span class="pl-s1">model</span>, <span class="pl-s1">args</span>, <span class="pl-s1">verbose</span>, <span class="pl-s1">training</span>, <span class="pl-s1">input_names</span>, <span class="pl-s1">output_names</span>, <span class="pl-s1">operator_export_type</span>, <span class="pl-s1">example_outputs</span>, <span class="pl-s1">propagate</span>, <span class="pl-s1">_retain_param_name</span>, <span class="pl-s1">do_constant_folding</span>, <span class="pl-s1">_disable_torch_constant_prop</span>)
    <span class="pl-c1">276</span> 
    <span class="pl-c1">277</span>     <span class="pl-s1">graph</span> <span class="pl-c1">=</span> <span class="pl-en">_optimize_graph</span>(<span class="pl-s1">graph</span>, <span class="pl-s1">operator_export_type</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">278</span>                             <span class="pl-s1">_disable_torch_constant_prop</span><span class="pl-c1">=</span><span class="pl-s1">_disable_torch_constant_prop</span>)
    <span class="pl-c1">279</span> 
    <span class="pl-c1">280</span>     <span class="pl-c"># NB: ONNX requires complete information about output types, which might be</span>

<span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-s1">anaconda3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">onnx</span><span class="pl-c1">/</span><span class="pl-s1">utils</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_optimize_graph</span>(<span class="pl-s1">graph</span>, <span class="pl-s1">operator_export_type</span>, <span class="pl-s1">_disable_torch_constant_prop</span>)
    <span class="pl-c1">181</span>     <span class="pl-s1">torch</span>.<span class="pl-s1">_C</span>.<span class="pl-en">_jit_pass_erase_number_types</span>(<span class="pl-s1">graph</span>)
    <span class="pl-c1">182</span>     <span class="pl-c"># onnx does not support tuples, so try to remove them</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">183</span>     <span class="pl-s1">torch</span>.<span class="pl-s1">_C</span>.<span class="pl-en">_jit_pass_lower_all_tuples</span>(<span class="pl-s1">graph</span>)
    <span class="pl-c1">184</span>     <span class="pl-s1">torch</span>.<span class="pl-s1">_C</span>.<span class="pl-en">_jit_pass_peephole</span>(<span class="pl-s1">graph</span>, <span class="pl-c1">True</span>)
    <span class="pl-c1">185</span>     <span class="pl-s1">torch</span>.<span class="pl-s1">_C</span>.<span class="pl-en">_jit_pass_lint</span>(<span class="pl-s1">graph</span>)

<span class="pl-v">RuntimeError</span>: <span class="pl-s1">tuple</span> <span class="pl-s1">appears</span> <span class="pl-c1">in</span> <span class="pl-s1">op</span> <span class="pl-s1">that</span> <span class="pl-s1">does</span> <span class="pl-c1">not</span> <span class="pl-s1">forward</span> <span class="pl-en">tuples</span> (<span class="pl-v">VisitNode</span> <span class="pl-s1">at</span> <span class="pl-c1">/</span><span class="pl-s1">pytorch</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">csrc</span><span class="pl-c1">/</span><span class="pl-s1">jit</span><span class="pl-c1">/</span><span class="pl-s1">passes</span><span class="pl-c1">/</span><span class="pl-s1">lower_tuples</span>.<span class="pl-s1">cpp</span>:<span class="pl-c1">117</span>)
<span class="pl-s1">frame</span> <span class="pl-c">#0: std::function&lt;std::string ()&gt;::operator()() const + 0x11 (0x7f9b0c2b3441 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#1: c10::Error::Error(c10::SourceLocation, std::string const&amp;) + 0x2a (0x7f9b0c2b2d7a in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#2: &lt;unknown function&gt; + 0xaf61f5 (0x7f9b0b4b41f5 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#3: &lt;unknown function&gt; + 0xaf6464 (0x7f9b0b4b4464 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#4: torch::jit::LowerAllTuples(std::shared_ptr&lt;torch::jit::Graph&gt;&amp;) + 0x13 (0x7f9b0b4b44a3 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#5: &lt;unknown function&gt; + 0x3f9444 (0x7f9b4b87b444 in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#6: &lt;unknown function&gt; + 0x130fac (0x7f9b4b5b2fac in /home/videoanalytics/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#7: _PyMethodDef_RawFastCallKeywords + 0x264 (0x564a1c09b6e4 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#8: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#9: _PyEval_EvalFrameDefault + 0x4e8c (0x564a1c0f72bc in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#10: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#11: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#12: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#13: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#14: _PyFunction_FastCallKeywords + 0x325 (0x564a1c09a9c5 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#15: _PyEval_EvalFrameDefault + 0x416 (0x564a1c0f2846 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#16: _PyEval_EvalCodeWithName + 0xbb9 (0x564a1c038db9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#17: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#18: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#19: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#20: _PyFunction_FastCallDict + 0x400 (0x564a1c039800 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#21: _PyEval_EvalFrameDefault + 0x1e20 (0x564a1c0f4250 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#22: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#23: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#24: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#25: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#26: PyEval_EvalCodeEx + 0x44 (0x564a1c0393c4 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#27: PyEval_EvalCode + 0x1c (0x564a1c0393ec in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#28: &lt;unknown function&gt; + 0x1e004d (0x564a1c10204d in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#29: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x564a1c09b569 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#30: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#31: _PyEval_EvalFrameDefault + 0x4755 (0x564a1c0f6b85 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#32: _PyGen_Send + 0x2a2 (0x564a1c094672 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#33: _PyEval_EvalFrameDefault + 0x1a6d (0x564a1c0f3e9d in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#34: _PyGen_Send + 0x2a2 (0x564a1c094672 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#35: _PyEval_EvalFrameDefault + 0x1a6d (0x564a1c0f3e9d in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#36: _PyGen_Send + 0x2a2 (0x564a1c094672 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#37: _PyMethodDef_RawFastCallKeywords + 0x8c (0x564a1c09b50c in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#38: _PyMethodDescr_FastCallKeywords + 0x4f (0x564a1c09b86f in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#39: _PyEval_EvalFrameDefault + 0x4c4c (0x564a1c0f707c in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#40: _PyFunction_FastCallKeywords + 0xfb (0x564a1c09a79b in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#41: _PyEval_EvalFrameDefault + 0x416 (0x564a1c0f2846 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#42: _PyFunction_FastCallKeywords + 0xfb (0x564a1c09a79b in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#43: _PyEval_EvalFrameDefault + 0x6a0 (0x564a1c0f2ad0 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#44: _PyEval_EvalCodeWithName + 0x2f9 (0x564a1c0384f9 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#45: _PyFunction_FastCallDict + 0x400 (0x564a1c039800 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#46: _PyObject_Call_Prepend + 0x63 (0x564a1c050c43 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#47: PyObject_Call + 0x6e (0x564a1c04595e in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#48: _PyEval_EvalFrameDefault + 0x1e20 (0x564a1c0f4250 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#49: _PyEval_EvalCodeWithName + 0x5da (0x564a1c0387da in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#50: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#51: _PyEval_EvalFrameDefault + 0x14ce (0x564a1c0f38fe in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#52: &lt;unknown function&gt; + 0x171cc6 (0x564a1c093cc6 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#53: &lt;unknown function&gt; + 0x171ecb (0x564a1c093ecb in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#54: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x564a1c09b569 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#55: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#56: _PyEval_EvalFrameDefault + 0x4755 (0x564a1c0f6b85 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#57: _PyEval_EvalCodeWithName + 0x5da (0x564a1c0387da in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#58: _PyFunction_FastCallKeywords + 0x387 (0x564a1c09aa27 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#59: _PyEval_EvalFrameDefault + 0x6a0 (0x564a1c0f2ad0 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#60: &lt;unknown function&gt; + 0x171cc6 (0x564a1c093cc6 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#61: &lt;unknown function&gt; + 0x171ecb (0x564a1c093ecb in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#62: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x564a1c09b569 in /home/videoanalytics/anaconda3/bin/python)</span>
<span class="pl-s1">frame</span> <span class="pl-c">#63: _PyCFunction_FastCallKeywords + 0x21 (0x564a1c09b801 in /home/videoanalytics/anaconda3/bin/python)</span></pre></div>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>
<p dir="auto">PyTorch version: 1.1.0</p>
</li>
<li>
<p dir="auto">Is debug build: No</p>
</li>
<li>
<p dir="auto">CUDA used to build PyTorch: 9.0.176</p>
</li>
<li>
<p dir="auto">OS: Ubuntu 18.04.2 LTS</p>
</li>
<li>
<p dir="auto">GCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0</p>
</li>
<li>
<p dir="auto">CMake version: Could not collect</p>
</li>
<li>
<p dir="auto">Python version: 3.7</p>
</li>
<li>
<p dir="auto">Is CUDA available: Yes</p>
</li>
<li>
<p dir="auto">CUDA runtime version: Could not collect</p>
</li>
<li>
<p dir="auto">GPU models and configuration: GPU 0: GeForce RTX 2080 Ti</p>
</li>
<li>
<p dir="auto">Nvidia driver version: 418.56</p>
</li>
<li>
<p dir="auto">cuDNN version: Could not collect</p>
</li>
<li>
<p dir="auto">Versions of relevant libraries:<br>
onnx==1.5.0<br>
[pip] numpy==1.14.6<br>
[pip] numpydoc==0.8.0<br>
[pip] torch==1.1.0<br>
[pip] torchvision==0.2.2.post3<br>
[conda] blas                      1.0                         mkl<br>
[conda] mkl                       2019.3                      199<br>
[conda] mkl-service               1.1.2            py37he904b0f_5<br>
[conda] mkl_fft                   1.0.10           py37ha843d7b_0<br>
[conda] mkl_random                1.0.2            py37hd81dba3_0<br>
[conda] torch                     1.1.0                    pypi_0    pypi<br>
[conda] torchvision               0.2.2.post3              pypi_0    pypi</p>
</li>
</ul>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/suo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/suo">@suo</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/houseroad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/houseroad">@houseroad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spandantiwari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spandantiwari">@spandantiwari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lara-hdr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lara-hdr">@lara-hdr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</a></p>
<p dir="auto"><strong>Summary by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a>.</strong> If you are using multiprocessing code, and are in Python 3, you can work around this problem by adding <code class="notranslate">mp.set_start_method('spawn')</code> to your script. Otherwise, to work around, you need to make sure there are no CUDA calls prior to starting your subprocesses; <code class="notranslate">torch.cuda.is_available()</code> and <code class="notranslate">torch.manual_seed</code> both count as a CUDA calls in PyTorch 0.2.0.</p>
<hr>
<p dir="auto">Run <a href="https://github.com/ikostrikov/pytorch-a3c">https://github.com/ikostrikov/pytorch-a3c</a> using pytorch 0.2.0, python 2.7 with error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="terminate called after throwing an instance of 'std::runtime_error'
  what():  CUDA error (3): initialization error"><pre class="notranslate"><code class="notranslate">terminate called after throwing an instance of 'std::runtime_error'
  what():  CUDA error (3): initialization error
</code></pre></div>
<p dir="auto">occur on this those lines:<br>
<a href="https://github.com/ikostrikov/pytorch-a3c/blob/842ec4da82df3d2dda02943d881c6b577f078ab9/train.py#L105-L111">https://github.com/ikostrikov/pytorch-a3c/blob/842ec4da82df3d2dda02943d881c6b577f078ab9/train.py#L105-L111</a></p>
<p dir="auto">while using pytorch 0.12.0 works fine</p>