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

Fix torch rules #581

Merged
merged 1 commit into from
Jan 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions mesecons_torch/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ local torch_get_output_rules = function(node)
return rotate_torch_rules(rules, node.param2)
end

local torch_input_rules_unrotated_horizontal = {vector.new(-2, 0, 0), vector.new(-1, 1, 0)}
local torch_input_rules_unrotated_vertical = {vector.new(-2, 0, 0)}

local torch_get_input_rules = function(node)
local rules = {{x = -2, y = 0, z = 0},
{x = -1, y = 1, z = 0}}
local rules = (node.param2 == 0 or node.param2 == 1)
and torch_input_rules_unrotated_vertical
or torch_input_rules_unrotated_horizontal

return rotate_torch_rules(rules, node.param2)
end
Expand Down