Skip to content
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

@torch.jit.script is not working properly #47

Closed
zceehua opened this issue Nov 27, 2018 · 8 comments
Closed

@torch.jit.script is not working properly #47

zceehua opened this issue Nov 27, 2018 · 8 comments

Comments

@zceehua
Copy link

zceehua commented Nov 27, 2018

Torch version is: 0.4.1(the lastest version shown in official website)
CUDA: 8.0
CUDNN: 7.0

I have no idea about the error and my colleague came with the same problem.

Here is the log:
raise NotSupportedError(base.range(), "slicing multiple dimensions at the same time isn't supported yet")
torch.jit.frontend.NotSupportedError: slicing multiple dimensions at the same time isn't supported yet
@torch.jit.script
def fused_add_tanh_sigmoid_multiply(input_a, input_b,n_channels):
n_channels_int = n_channels[0]
in_act = input_a+input_b
t_act = torch.nn.functional.tanh(in_act[:, :n_channels_int, :])
<--- HERE
s_act = torch.nn.functional.sigmoid(in_act[:,n_channels_int:, :])
acts = t_act * s_act
return acts

@yhgon
Copy link

yhgon commented Nov 27, 2018

#4 (comment)
it's pytorch version issue. if you update pytorch 1.0.0a0, it works well.

@jiqizaisikao
Copy link

I removed all the @torch.jit.script and it works well for pytorch of version 0.4

@rafaelvalle
Copy link
Contributor

Please update to pytorch 1.0 to benefit from the performance improvement.

@zceehua
Copy link
Author

zceehua commented Nov 28, 2018

@jiqizaisikao Awesome! That works, thanks man!

@jiangyangbo
Copy link

@jiqizaisikao@zceehua , i removed @@torch.jit.script , and pytorch of version is 0.4, but result a error: AttributeError: Can't get attribute '_rebuild_parameter' on <module 'torch._utils' from '/home/greed/anaconda3/lib/python3.6/site-packages/torch/_utils.py'>

@rafaelvalle
Copy link
Contributor

Please update to pytorch 1.0.

@jiangyangbo
Copy link

@rafaelvalle , I update to pytorch 1.0, it work well now. Tks.

@Diaislam
Copy link

well i had pytorch 1.0 installed and i had to downgrade it to solve an error so i can't upgrade it again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants