Skip to content

Commit

Permalink
follow-up on #443 to invert k channels (instead of 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
shelhamer committed May 23, 2014
1 parent 0cd46b2 commit f56f86a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/caffe/pycaffe.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ def _Net_deprocess(self, input_name, input_):
decaf_in += mean
decaf_in = decaf_in.transpose((1,2,0))
if channel_order:
channel_order_inverse = tuple([channel_order.index(i) for i in (0,1,2)])
channel_order_inverse = [channel_order.index(i)
for i in range(decaf_in.shape[2])]
decaf_in = decaf_in[:, :, channel_order_inverse]
if input_scale:
decaf_in /= input_scale
Expand Down

0 comments on commit f56f86a

Please sign in to comment.