jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.31k stars 2.7k forks source link

<optim.lbfgs> function value changing less than tolX #254

Open ProGamerGov opened 8 years ago

ProGamerGov commented 8 years ago

ubuntu@ip-Address:~/neural-style$ th neural_style.lua -seed 80085 -image_size 1280 -style_image style.jpg -content_image content.jpg -output_image out.png -tv_weight 0.0001 -save_iter 50 -num_iterations 1500 -model_file models/nin_imagenet_conv.caffemodel -proto_file models/train_val.prototxt -backend cudnn -cudnn_autotune
Successfully loaded models/nin_imagenet_conv.caffemodel
MODULE data UNDEFINED
warning: module 'data [type 5]' not found
conv1: 96 3 11 11
cccp1: 96 96 1 1
cccp2: 96 96 1 1
conv2: 256 96 5 5
cccp3: 256 256 1 1
cccp4: 256 256 1 1
conv3: 384 256 3 3
cccp5: 384 384 1 1
cccp6: 384 384 1 1
conv4-1024: 1024 384 3 3
cccp7-1024: 1024 1024 1 1
cccp8-1024: 1000 1024 1 1
Running optimization with L-BFGS
<optim.lbfgs>   creating recyclable direction/step/history buffers
<optim.lbfgs>   function value changing less than tolX
ubuntu@ip-Address:~/neural-style$

Not sure what causes this error. It can be really annoying sometimes.

Runescaped commented 8 years ago

Weird, I only get that error after a few thousand iterations...

Does it also occur when you use the ADAM optimizer? Does it only occur when you use the NIN model?

Another user reported having this issue...: https://github.com/jcjohnson/neural-style/issues/250

ProGamerGov commented 8 years ago

@Runescaped It occured this time when using lbfgs, and the NIN model. Though I seem to recall it has happened with the default VGG-19 model as well. I think it may have something to do with the size of the style or content image.

3DTOPO commented 8 years ago

My pull request fixes the issue: https://github.com/jcjohnson/neural-style/pull/97

chrisnovello commented 8 years ago

I get this too but so far only with lbfgs / haven't seen it with adam