facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

caffe_translator Error: eltwise layer #2349

Open stevenyslins opened 6 years ago

stevenyslins commented 6 years ago

Dear all,

I want to convert inception-resnet-v2 model from caffe to caffe2, I use this project to download deploy_inception-resnet-v2.prototxt and inception-resnet-v2.caffemodel, then launch this command:

python -m caffe2.python.caffe_translator deploy_inception-resnet-v2.prototxt inception-resnet-v2.caffemodel

but it will get fail, it seems like not supported, so has the problem been solved ? Thank you for your help.

root@b8626bef4308:/opt/caffe2# python -m caffe2.python.caffe_translator deploy_inception-resnet-v2.prototxt inception-resnet-v2.caffemodel 
INFO:caffe_translator:Translate layer conv1_3x3_s2
INFO:caffe_translator:Translate layer conv1_3x3_s2_bn
INFO:caffe_translator:Translate layer conv1_3x3_s2_scale
INFO:caffe_translator:Translate layer conv1_3x3_relu
INFO:caffe_translator:Translate layer conv2_3x3_s1
INFO:caffe_translator:Translate layer conv2_3x3_s1_bn
INFO:caffe_translator:Translate layer conv2_3x3_s1_scale
INFO:caffe_translator:Translate layer conv2_3x3_relu
INFO:caffe_translator:Translate layer conv3_3x3_s1
INFO:caffe_translator:Translate layer conv3_3x3_s1_bn
INFO:caffe_translator:Translate layer conv3_3x3_s1_scale
INFO:caffe_translator:Translate layer conv3_3x3_relu
INFO:caffe_translator:Translate layer pool1_3x3_s2
INFO:caffe_translator:Translate layer conv4_3x3_reduce
INFO:caffe_translator:Translate layer conv4_3x3_reduce_bn
INFO:caffe_translator:Translate layer conv4_3x3_reduce_scale
INFO:caffe_translator:Translate layer conv4_3x3_reduce_relu
INFO:caffe_translator:Translate layer conv4_3x3
INFO:caffe_translator:Translate layer conv4_3x3_bn
INFO:caffe_translator:Translate layer conv4_3x3_scale
INFO:caffe_translator:Translate layer conv4_relu_3x3
INFO:caffe_translator:Translate layer pool2_3x3_s2
INFO:caffe_translator:Translate layer conv5_1x1
INFO:caffe_translator:Translate layer conv5_1x1_bn
INFO:caffe_translator:Translate layer conv5_1x1_scale
INFO:caffe_translator:Translate layer conv5_1x1_relu
INFO:caffe_translator:Translate layer conv5_5x5_reduce
INFO:caffe_translator:Translate layer conv5_5x5_reduce_bn
INFO:caffe_translator:Translate layer conv5_5x5_reduce_scale
INFO:caffe_translator:Translate layer conv5_5x5_reduce_relu
INFO:caffe_translator:Translate layer conv5_5x5
INFO:caffe_translator:Translate layer conv5_5x5_bn
INFO:caffe_translator:Translate layer conv5_5x5_scale
INFO:caffe_translator:Translate layer conv5_5x5_relu
INFO:caffe_translator:Translate layer conv5_3x3_reduce
INFO:caffe_translator:Translate layer conv5_3x3_reduce_bn
INFO:caffe_translator:Translate layer conv5_3x3_reduce_scale
INFO:caffe_translator:Translate layer conv5_3x3_reduce_relu
INFO:caffe_translator:Translate layer conv5_3x3
INFO:caffe_translator:Translate layer conv5_3x3_bn
INFO:caffe_translator:Translate layer conv5_3x3_scale
INFO:caffe_translator:Translate layer conv5_3x3_relu
INFO:caffe_translator:Translate layer conv5_3x3_2
INFO:caffe_translator:Translate layer conv5_3x3_2_bn
INFO:caffe_translator:Translate layer conv5_3x3_2_scale
INFO:caffe_translator:Translate layer conv5_3x3_2_relu
INFO:caffe_translator:Translate layer ave_pool
INFO:caffe_translator:Translate layer conv5_1x1_ave
INFO:caffe_translator:Translate layer conv5_1x1_ave_bn
INFO:caffe_translator:Translate layer conv5_1x1_ave_scale
INFO:caffe_translator:Translate layer conv5_1x1_ave_relu
INFO:caffe_translator:Translate layer stem_concat
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_1x1
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_1x1_bn
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_1x1_scale
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_1x1_relu
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_reduce
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_reduce_bn
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_reduce_scale
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_reduce_relu
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_bn
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_scale
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_relu
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_reduce
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_reduce_bn
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_reduce_scale
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_reduce_relu
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_bn
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_scale
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_2_relu
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_3
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_3_bn
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_3_scale
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_3x3_3_relu
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_concat
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_up
INFO:caffe_translator:Translate layer inception_resnet_v2_a1_residual_eltwise
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/caffe2/caffe2/python/caffe_translator.py", line 928, in <module>
    input_dims=args.input_dims
  File "/opt/caffe2/caffe2/python/caffe_translator.py", line 299, in TranslateModel
    return TranslatorRegistry.TranslateModel(*args, **kwargs)
  File "/opt/caffe2/caffe2/python/caffe_translator.py", line 288, in TranslateModel
    net_params=net_params, input_dims=input_dims)
  File "/opt/caffe2/caffe2/python/caffe_translator.py", line 228, in TranslateLayer
    layer, pretrained_blobs, is_test, **kwargs)
  File "/opt/caffe2/caffe2/python/caffe_translator.py", line 753, in TranslateElementWise
    raise RuntimeError("This eltwise layer is not yet supported.")
RuntimeError: This eltwise layer is not yet supported.
hoL1day commented 6 years ago

Meet the same problem when convert Flownet2.0. Maybe because the eltwise layer is not that popular, hope it come soon.