512*block.expension doesn’t match the incoming number of features, so you would either have to decrease the spatial size of the activation through conv/pool layers or set in_features=51200 for self.fc.