SSD复现,解决ValueError: setting an array element with a sequence. The requested array has an inhomogeneo

复现SSD+pytorch时会出现以上bug,错误原因来源于mode=random.choice(....)

 解决方法,改为:

ran_num = np.random.choice([0,1,2,3,4,5])
mode=self.sample_options[ran_num]

你可能感兴趣的:(numpy,python,深度学习)