Python 凯拉斯:有可能给拉姆达层起个名字吗?
我的模型定义中有以下代码Python 凯拉斯:有可能给拉姆达层起个名字吗?,python,keras,deep-learning,Python,Keras,Deep Learning,我的模型定义中有以下代码 # (None, 6) -> (None, 8) def affine_to_projective(x): y = tf.pad(x, paddings=tf.constant([[0, 0], [0, 2]]), mode='CONSTANT', constant_values=0 ) return y projective_
# (None, 6) -> (None, 8)
def affine_to_projective(x):
y = tf.pad(x,
paddings=tf.constant([[0, 0], [0, 2]]),
mode='CONSTANT',
constant_values=0
)
return y
projective_transform = Lambda(affine_to_projective)(affine_transform)
在模型摘要中,它被视为
lambda_1 (Lambda) (None, 8) 0 affine_transform[0][0]
是否可以为该层命名而不是
lambda_1
?是的,您是否尝试为其命名?
projective_transform = Lambda(affine_to_projective, name='lambda_name')(affine_transform)