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

Terminates after 2 iterations, no output #179

Open
cashpipeplusplus opened this issue Mar 15, 2016 · 2 comments
Open

Terminates after 2 iterations, no output #179

cashpipeplusplus opened this issue Mar 15, 2016 · 2 comments

Comments

@cashpipeplusplus
Copy link

With lbfgs, I'm getting no output image and termination after just 2 iterations.

My command-line is:

th neural_style.lua -style_image examples/inputs/starry_night.jpg -content_image examples/inputs/hoovertowernight.jpg -gpu -1 -print_iter 1

Here's the console output:

[libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading dangerously large protocol message.  If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192
Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel
conv1_1: 64 3 3 3
conv1_2: 64 64 3 3
conv2_1: 128 64 3 3
conv2_2: 128 128 3 3
conv3_1: 256 128 3 3
conv3_2: 256 256 3 3
conv3_3: 256 256 3 3
conv3_4: 256 256 3 3
conv4_1: 512 256 3 3
conv4_2: 512 512 3 3
conv4_3: 512 512 3 3
conv4_4: 512 512 3 3
conv5_1: 512 512 3 3
conv5_2: 512 512 3 3
conv5_3: 512 512 3 3
conv5_4: 512 512 3 3
fc6: 1 1 25088 4096
fc7: 1 1 4096 4096
fc8: 1 1 4096 1000
Running optimization with L-BFGS
Iteration 1 / 1000
  Total loss: 0.000000  
<optim.lbfgs>   creating recyclable direction/step/history buffers
Iteration 2 / 1000
  Total loss: 0.000000  
<optim.lbfgs>   function value changing less than tolX  

If I switch to adam, I get all 1000 iterations, each with Total loss: 0.000000 afterward and this image as output:
image

Am I doing something wrong?

@htoyryla
Copy link

cashpipeplusplus [email protected] kirjoitti 15.3.2016 kello 15.33:

With lbfgs, I'm getting no output image and termination after just 2 iterations.

My command-line is:

th neural_style.lua -style_image examples/inputs/starry_night.jpg -con
tent_image examples/inputs/hoovertowernight.jpg -gpu -1 -print_iter 1

Here's the console output:

...
fc6: 1 1 25088 4096
fc7: 1 1 4096 4096
fc8: 1 1 4096 1000
Running optimization with L-BFGS
Iteration 1 / 1000
Total loss: 0.000000
<optim.lbfgs> creating recyclable direction/step/history buffers
Iteration 2 / 1000
Total loss: 0.000000
<optim.lbfgs> function value changing less than tolX
It appears that for some reason no content and style layers are selected.

Try adding the following to the command line:

-content_layers relu4_2 -style_layers relu1_1,relu2_1,relu3_1,relu4_1,relu5_1

(no spaces after the commas) which should be the default.

Hannu

petronny added a commit to petronny/neural-style that referenced this issue Oct 12, 2016
@petronny
Copy link

@cashpipeplusplus I've fix this issue in #338

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

3 participants