Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix channels not convert from BGR to RGB when len(layer_blobs[0].shap…
Browse files Browse the repository at this point in the history
…e.dim) == 0 (#4625)
  • Loading branch information
ae86208 authored and piiswrong committed Jan 10, 2017
1 parent e1cafff commit 093844e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/caffe_converter/convert_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main():
wmat_dim = list(layer_blobs[0].shape)
wmat = np.array(layer_blobs[0].data).reshape(wmat_dim)
bias = np.array(layer_blobs[1].data)
channels = layer_blobs[0].channels;
channels = wmat_dim[1]
if channels == 3 or channels == 4: # RGB or RGBA
if first_conv:
print 'Swapping BGR of caffe into RGB in mxnet'
Expand Down

0 comments on commit 093844e

Please sign in to comment.