RuntimeError: The expanded size of the tensor (3) must match the existing size (864) at non-singleton dimension 3

So I tried creating a new CNN model (image_encoder) that’ll load an existing state_dict yet I keep getting an error with the expanded size. I tried google searching the error and wasn’t sure if their relevant to my problem at the moment. Apparently some shapes are wrong inside the image_encoder object instance but idk how to start. First image is where image_encoder is created through object instance, second is the class of where the object was created (CNN_encoder), and lastly is where I call build_models function from the first image.

encoder

cnn_encoder