You should ideally pass a tensor of shape B x C x H x W, B=batch_size, C=channel, H=height and W=width.
Assuming the exception above is occurring at the input layer, it looks like you are passing a tensor of shape 2 x 1000. Can you verify the shape of your input tensor?