使用:
Tensorflow 1.13.1
keras == 2.2.4
我无法使用尺寸为[None,None,None,n_channel]
的占位符来创建自我关注图,因为自我关注矩阵需要H和W。 H * W将返回NoneType*NoneType
乘法错误。
Code that uses Layer Module of Keras。这需要放在自定义net()函数内部,该函数使用以下占位符作为输入。 A sample of a custom model function I'm trying to replicate for my case.
输入为self.x_placehoder = tf.placeholder(shape=(None, None, None, n_channel), dtype=tf.float32)