YuxianMeng / Matrix-Capsules-pytorch

A Pytorch implementation of "Matrix Capsules with EM routing"
233 stars 48 forks source link

some code question #3

Open FightAllDays opened 6 years ago

FightAllDays commented 6 years ago

when Debug at herey_range = (max(floor((j-self.K)/self.stride)+1,0),min(j//self.stride+1,width_out))will print error TypeError: range() integer start argument expected, got float.

JingyunLiang commented 6 years ago

Range() only receives int. You should use int(your float number) to turn it to int.

FightAllDays commented 6 years ago

Thank you for your response:)Though I know how to correct,I couldn't get a correct loss.Whether you could run this code again and tell me your result:)

JingyunLiang commented 6 years ago

The test accuracy is 0.9889. Here is the checkpoint in the 5th epoch ( I just run it with negligible modification, extract it first and resume from this epoch). model_4.pth.zip