if you have input (50,3,299,299) and something in between gets (50, 1000) but expects 4d input, it probably means you are trying to pass 1d ouput to image-processing layer (channels, h, w)
(50, 1000) looks like an output of some classifier with batch size 50 and num_classes = 1000