SSD+pytorch-解决ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.
复现时代码报错:
数据增强部分代码出现错误
解决方法:
mode = random.choice(self.sample_options)
#修改成如下
ran_num = np.random.choice([0, 1, 2, 3, 4, 5])
mode = self.sample_options[ran_num]