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

Encounter error when trying to use ResNet-50 to replace VGG-19 as the loss network #67

Open
michaelhuang74 opened this issue Mar 11, 2017 · 2 comments

Comments

@michaelhuang74
Copy link

I tried to replace the VGG-19 with ReSNet-50 for the loss network used in the training.
I downloaded the prototxt and caffemodel files from https://onedrive.live.com/?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%2117887&cid=4006CBB8476FF777, which is given on https://github.com/KaimingHe/deep-residual-networks

Then I tried to launch the training as following:
th train.lua -style_image style/face_bottle_o.png -style_size 512 -image_size 256 -style_layers res2b_relu,res3b_relu,res4b_relu,res5b_relu -content_layers res4b_relu -style_weight 20 -content_weight 1 -proto_file data/pretrained/ResNet-50-deploy.prototxt -model_file data/pretrained/ResNet-50-model.caffemodel -checkpoints_path checkpoint/ -checkpoints_name face_bottle_o.s512i256.sL2b3b4b5b.cL4b.sw20.cw1.ResNet50.4x -num_iterations 10000 -batch_size 4 -save_every 2000

I encountered the following errors.
torch.display not found. unable to plot
Using TV loss with weight 1e-06
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 26:26: Message type "caffe.LayerParameter" has no field named "batch_norm_param".
Successfully loaded data/pretrained/ResNet-50-model.caffemodel
warning: module 'bn_conv1 [type BatchNorm]' not found
warning: module 'scale_conv1 [type Scale]' not found
warning: module 'pool1_pool1_0_split [type Split]' not found
warning: module 'bn2a_branch1 [type BatchNorm]' not found
warning: module 'scale2a_branch1 [type Scale]' not found
warning: module 'bn2a_branch2a [type BatchNorm]' not found
warning: module 'scale2a_branch2a [type Scale]' not found
..........(similar warning messages)
warning: module 'bn5c_branch2b [type BatchNorm]' not found
warning: module 'scale5c_branch2b [type Scale]' not found
warning: module 'bn5c_branch2c [type BatchNorm]' not found
warning: module 'scale5c_branch2c [type Scale]' not found
warning: module 'res5c [type Eltwise]' not found
conv1: 64 3 7 7
res2a_branch1: 256 64 1 1
Segmentation fault (core dumped)

Any idea how to resolve this issue? Thanks.

@DmitryUlyanov
Copy link
Owner

Hello, I've never tried to use resnet and have no clue for this segfault...

@Vladkryvoruchko
Copy link

Vladkryvoruchko commented Apr 20, 2017

Hello @michaelhuang74 . There was title changes in layers and it's attributes names.
I have faced similar problem soon.
Shortly: try changing in prototxt 'batch_norm_param' to 'bn_param'

There can be more than 1 name error

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