【发布时间】:2020-09-05 12:37:11
【问题描述】:
我正在尝试在 Tensorflow-Keras 的自定义层中使用多个输入。用法可以是任何东西,现在它被定义为将蒙版与图像相乘。我搜索了 SO,我能找到的唯一答案是 TF 1.x,所以它没有任何好处。
class mul(layers.Layer):
def __init__(self, **kwargs):
super().__init__(**kwargs)
# I've added pass because this is the simplest form I can come up with.
pass
def call(self, inputs):
# magic happens here and multiplications occur
return(Z)
【问题讨论】:
标签: python tensorflow keras layer