input_scale = self.input_scale.get(input_name)
channel_order = self.channel_swap.get(input_name)
mean = self.mean.get(input_name)
if mean is not None:
decaf_in += mean
decaf_in = decaf_in.transpose((1,2,0))
if channel_order:
channel_order_inverse = [channel_order.index(i)
for i in range(decaf_in.shape[2])]
After Change
decaf_in = input_.copy().squeeze()
input_scale = self.input_scale.get(input_name)
channel_order = self.channel_swap.get(input_name)
if hasattr(self, "mean"):
decaf_in += self.mean.get(input_name, 0)
decaf_in = decaf_in.transpose((1,2,0))
if channel_order:
channel_order_inverse = [channel_order.index(i)
for i in range(decaf_in.shape[2])]