嗨,我正在用我和keras进行的radon transmorm创建函数,但它返回错误,该函数是:
def first_operation(img):
theta=np.linspace(0.,180.,180,endpoint=False)
Au=radon(u_stage,theta=theta)
return Au
错误是:
Au = rad(u_stage,theta = theta)(如果image.ndim!= 2:
AttributeError:'Tensor'对象没有属性'ndim'
我该如何解决?
keras模型是:
input_Au=Input(shape=(180,180,1))
x1=first_operation(input_Au)
x1=Conv2D((3,3),10,padding='same')(x1)
model=Model([input_Au],x1)
model.summary