Open kaiwang960112 opened 4 years ago
@kaiwang960112 这个问题 “第一个bug是assert(kernel_size) == conv_dims,这个一直assert错误” 解决了吗 ? 如果解决能否告知该如何修改?
可以试试在analysis\layers.py 修改
class Sliding(Base): def init(self,input,kernel_size,num_out,stride=1,pad=0,name='sliding',ceil=False,transpose=False): ........ if type(kernel_size) == int: self.kernel_size = [kernel_size] * conv_dims else: assert len(kernel_size)==conv_dims self.kernel_size = [i for i in kernel_size] ........
改为 :
if type(kernel_size) == int:
self.kernel_size = [kernel_size] * conv_dims
elif len(kernel_size)==1:
self.kernel_size = [kernel_size[0]] * conv_dims
else:
assert len(kernel_size)==conv_dims
self.kernel_size = [i for i in kernel_size]
第一个bug是assert(kernel_size) == conv_dims,这个一直assert错误 第二个是import 不了resnet18. 谢谢啦。 按照你release的code执行是这样的结果