Follow your code.




layer
output_size




input
(N, 1, 150, 3)


conv1_bn_relu
(N, 6, 151, 4)


max_pool2d
(N, 6, 75, 2)


conv2_bn_relu
(N, 8, 76, 3)


max_pool2d
(N, 8, 38, 1)


conv3_bn_relu
(N, 12, 39, 2)


max_pool2d
(N, 12, 19, 1)


view
(N, 228)



So, in_features in self.fc1 must be 228 instead of 152.