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
6 changes: 3 additions & 3 deletions neural_style.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ cmd:option('-style_layers', 'relu1_1,relu2_1,relu3_1,relu4_1,relu5_1', 'layers f


local function main(params)
if params.seed >= 0 then
torch.manualSeed(params.seed)
end
local dtype, multigpu = setup_gpu(params)

local loadcaffe_backend = params.backend
Expand Down Expand Up @@ -195,9 +198,6 @@ local function main(params)
collectgarbage()

-- Initialize the image
if params.seed >= 0 then
torch.manualSeed(params.seed)
end
local img = nil
if params.init == 'random' then
img = torch.randn(content_image:size()):float():mul(0.001)
Expand Down