Hello comunity i have the problem

i have the follow problem.
help please


The problem occurs due to the input format that you are using. You have to feed input in the following format - BxCxHxW. You have used the channel as the last dimension(BxHxWxC - this is wrong).


I’ll see if it works


sorry, I still have the same problem this is the part of the image rescaling:

def process_img(self, image):
i2 = np.array(image.raw_data)
i2 = i2.reshape((self.im_height, self.im_width, 4))
i2 = i2.mean(2)
i2 = i2.astype(np.float32)
i2 *= 1.0/255.0
i2 = cv2.resize(i2, (84,84))
i2 = np.reshape(i2, [1,84,84])
self.front_camera = i2

self.front_camera is the one to introduce to the convolutional neural network please help me