AttributeError: can’t set attribute
class A(B):
def __init__(self,output_shape, **kwargs):
self.output_shape = output_shape
报错:AttributeError: can’t set attribute
原因:output_shape与你这个类继承的B中的某一参数重名(B也有output_shape这一参数),可以将output_shape改为outputShape