Dimension out of index error

Any help will be highly appreaciable
learn = ConvLearner.pretrained(resnet34, md, ps=0.5) #dropout 50% upon running this
def reset_parameters(self):
—> 49 stdv = 1. / math.sqrt(self.weight.size(1))
50 self.weight.data.uniform_(-stdv, stdv)
51 if self.bias is not None:

RuntimeError: Dimension out of range (expected to be in range of [-1, 0], but got 1)