ethereon / caffe-tensorflow

Caffe models in TensorFlow
Other
2.8k stars 1.04k forks source link

Message type "caffe.BatchNormParameter" has no field named "slope_filler". #168

Open h-bo opened 6 years ago

bhadresh74 commented 6 years ago

@h-bo Having the same issue. Please update here if you get it working..

h-bo commented 6 years ago

@bhadresh74 I met this issue when using tsn-caffe. In fact, I found the reason was that the caffe version tsn used was different from the latest, and was modified by WangLiMin(author of tsn). I rewrote tsn-tensorflow. Conctact me if you need.

bhadresh74 commented 6 years ago

@h-bo Yeah, I am using the original PSPNet caffe .prototext which has the BN Parameter "slove_filler" which is unrecognized by this code. Not sure why. Any help would be appreciated. Thanks (Y)

pfabreu commented 6 years ago

@h-bo Could you please tell me how you got this working or if you have the tsn models in tensorflow please?

h-bo commented 6 years ago

@pedro-abreu I upload my code in my github. But its result is worse than expected. The author of tsn recommend me to use their pyTorch version. Hope to help you.

pfabreu commented 6 years ago

@h-bo I'm just asking because I wanted to port their weights to keras and use the Inceptionv3 that exists in keras, which might have a slightly more optimized BN than tf. However conversion of tensorflow checkpoints to keras is much easier than from their custom caffe to keras. If you had .ckpt from tf it would be cool but I assume your .npy or .pkl files have the weights?

bhadresh74 commented 6 years ago

I have converted Caffe weights to TensorFlow with approximate difference of 10e-4.

The way I did it,

  1. Convert .caffemodel to .npy
  2. Implement caffe model architecture in TensorFlow
  3. Load .npy file in the TensorFlow model
  4. Compare layer by layer result with Caffe.

SMU if you are stuck at, I might be able to help you.

Bhadresh

On Sun, Jun 17, 2018 at 10:48 AM Pedro Abreu notifications@github.com wrote:

@h-bo https://github.com/h-bo I'm just asking because I wanted to port their weights to keras and use the Inceptionv3 that exists in keras, which might have a slightly optimized BN than tf. However conversion of tensorflow checkpoints to keras is much easier than from their custom caffe to keras. If you had .ckpt from tf it would be cool but I assume your .npy or .pkl files have the weights?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ethereon/caffe-tensorflow/issues/168#issuecomment-397887664, or mute the thread https://github.com/notifications/unsubscribe-auth/AImy9kMoz0XY1TyjoFyWnu-aHc2ASodWks5t9npegaJpZM4TK9Zh .