leeyeehoo / CSRNet-pytorch

CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
642 stars 259 forks source link

python3下使用报错 #39

Closed wait1988 closed 5 years ago

wait1988 commented 5 years ago

self.frontend.state_dict().items()[i][1].data[:] = mod.state_dict().items()[i][1].data[:] TypeError: 'odict_items' object does not support indexing

有大神知道该怎么改吗?

WhuRan commented 5 years ago

items1 = list(self.frontend.state_dict().items()) items2 = list(mod.state_dict().items()) items1[i][1].data[:] = items2[i][1].data[:]

wait1988 commented 5 years ago

Thks