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

inplace ReLU does not work #1

Closed
szagoruyko opened this issue Jul 5, 2015 · 5 comments
Closed

inplace ReLU does not work #1

szagoruyko opened this issue Jul 5, 2015 · 5 comments

Comments

@szagoruyko
Copy link
Contributor

th> m = nn.ReLU(true):cl()
                                                                      [0.0001s]
th> m:forward(torch.ClTensor(8))
Using Apple platform: Apple
Using device: HD Graphics 4000
/usr/local/share/lua/5.1/clnn/Threshold.lua:8: attempt to index field 'input' (a nil value)
stack traceback:
    /usr/local/share/lua/5.1/clnn/Threshold.lua:8: in function 'Threshold_updateOutput'
    /usr/local/share/lua/5.1/nn/Threshold.lua:20: in function 'forward'
    [string "_RESULT={m:forward(torch.ClTensor(8))}"]:1: in main chunk
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/trepl/init.lua:630: in function 'repl'
    /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk
    [C]: at 0x0106c38400
@hughperkins
Copy link
Owner

Hmmm, interesting. Will check. (Note: can reproduce this on my own system ok)

@hughperkins
Copy link
Owner

So, just to check, with inplace=true, it should actually modify the incoming input data, is that right? (edit: ok, just checked, on nn, and yes, it modifies the incoming 'input' data)

@hughperkins
Copy link
Owner

Try now?

@szagoruyko
Copy link
Contributor Author

yes it should modify input data, thanks it works now

@hughperkins
Copy link
Owner

Ok, cool :-)

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

2 participants