在keras的所有代码示例中,我看到输入形状是直接传递的,并且推测批处理大小是第一个,例如:model.add(Dense(32, input_shape=(now the model will take as input arrays of shape (*, 16)但是,当涉及到自定义损失时def loss(y_true,y_pred):
return K.mean(K.square(
# separately create an encoder model目前这不能正常工作...当我查看训练历史时,该模型似乎忽略了额外的度量,仅基于交叉熵损失进行训练。另外,如果我将损失函数更改为只考虑wlm度量,我会得到错误消息"numpy.float64“object has no attribute "get_shape”(我不知道将wlm函数的返回类型更改为张量是