New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upsample_bilinear2d() got an unexpected keyword argument 'align_corners' (occurred when translating upsample_bilinear2d) #154
Comments
I don't have time to do a test, but I guess it will be fixed if you update your pytorch/onnx with onnx/onnx#1023 |
@lanpa my onnx is already the newest one, onnx1.2.1. Is there any other solutions? |
Have you built newest pytorch from source? Please post a code snippet so I can try it as well. |
pytorch0.4 is installed by conda. class Net1(nn.Module): error: |
I use
|
My python version is 2.7, may be this is the problem? install pytorch and tensorboardX with |
your pytorch is not the latest. use |
Hi, did you do the test with the code you provided? |
yes, the code is unchanged |
Do you have the same warning message as mine? A quick solution might be the same as #145 |
No, there is only error message. |
conv1's feature map is 10D and your upsample layer expects 20 channel input |
Sorry, I first add unsample behind conv2_drop, then add after conv1. Now, I have modified the mistake, but the error message is the same |
How about test in a conda virtual environment? |
Sorry, what did you mean? A conda virtual environment is the same to the active environment, what to test ? |
It comes to my mind that does your network forwards its input properly? |
Did you mean the dummy_input or the ConvTranspose2d attribute ? I haven't found the wrong setting ...... |
dummy_input. I just posted an introduction in chinese. Hope that helps (check the add_graph part). https://zhuanlan.zhihu.com/p/37626738 |
After upsample by scale of 2, the number of elements roughly multipled by 4 times. so the following layers need to be rewrite. (those you commented out) |
A stupid mistake.... Thank you |
tensorboardX1.2 may not support upsample module in pytorch0.4
File "/home/wanghongzhen/anaconda2/lib/python2.7/site-packages/tensorboardX/writer.py", line 422, in add_graph
self.file_writer.add_graph(graph(model, input_to_model, verbose))
File "/home/wanghongzhen/anaconda2/lib/python2.7/site-packages/tensorboardX/graph.py", line 94, in graph
torch.onnx._optimize_trace(trace, False)
File "/home/wanghongzhen/anaconda2/lib/python2.7/site-packages/torch/onnx/init.py", line 30, in _optimize_trace
trace.set_graph(utils._optimize_graph(trace.graph(), aten))
File "/home/wanghongzhen/anaconda2/lib/python2.7/site-packages/torch/onnx/utils.py", line 95, in _optimize_graph
graph = torch._C._jit_pass_onnx(graph, aten)
File "/home/wanghongzhen/anaconda2/lib/python2.7/site-packages/torch/onnx/init.py", line 40, in _run_symbolic_function
return utils._run_symbolic_function(*args, **kwargs)
File "/home/wanghongzhen/anaconda2/lib/python2.7/site-packages/torch/onnx/utils.py", line 368, in _run_symbolic_function
return fn(g, *inputs, **attrs)
TypeError: upsample_bilinear2d() got an unexpected keyword argument 'align_corners' (occurred when translating upsample_bilinear2d)
The text was updated successfully, but these errors were encountered: