Skip to content

Commit

Permalink
Merge pull request BVLC#3290 from ernest-tg/master
Browse files Browse the repository at this point in the history
[pycaffe] correct transposition & channel_swap in deprocess
  • Loading branch information
shelhamer committed Nov 11, 2015
2 parents 14ef9a0 + 32dc03f commit b4c6e2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/caffe/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ def deprocess(self, in_, data):
if raw_scale is not None:
decaf_in /= raw_scale
if channel_swap is not None:
decaf_in = decaf_in[channel_swap, :, :]
decaf_in = decaf_in[np.argsort(channel_swap), :, :]
if transpose is not None:
decaf_in = decaf_in.transpose([transpose[t] for t in transpose])
decaf_in = decaf_in.transpose(np.argsort(transpose))
return decaf_in

def set_transpose(self, in_, order):
Expand Down

0 comments on commit b4c6e2d

Please sign in to comment.