Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions neural_style.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ local function main(params)
end
net:add(tv_mod)
end
for i = 1, #cnn do
for i,layer in ipairs(cnn.modules) do
if next_content_idx <= #content_layers or next_style_idx <= #style_layers then
local layer = cnn:get(i)
local name = layer.name
local layer_type = torch.type(layer)
local is_pooling = (layer_type == 'cudnn.SpatialMaxPooling' or layer_type == 'nn.SpatialMaxPooling')
Expand Down