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

Ask a question of nn.SplitTable? #1312

Open
xtanitfy opened this issue Apr 28, 2018 · 1 comment
Open

Ask a question of nn.SplitTable? #1312

xtanitfy opened this issue Apr 28, 2018 · 1 comment

Comments

@xtanitfy
Copy link

xtanitfy commented Apr 28, 2018

The code as follow:
mlp = nn.SplitTable(1, 2)
pred = mlp:forward(torch.randn(2, 4, 3))//will get four 2*3 matrix
for i, k in ipairs(pred) do print(i, k) end

I haven't figured out why the result that is.Ask for your help,thanks!

@Naruto-Sasuke
Copy link

https://github.com/torch/nn/blob/master/SplitTable.lua#L13 , as you can see, nn.SplitTable(1,2) applied for handling torch.random(2,4,3) is equivalent to 'nn.SplitTable(2)', so you should know how it happens.

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