WangLia
WangLia
python3
请问您所用的keras版本是?在自定义loss时总会报错,TypeError: compile() missing 1 required positional argument: 'loss'。 然后,我改成 def myloss(s1_in, ps1): loss1 = K.mean(K.categorical_crossentropy(s1_in, ps1, from_logits=True)) loss2 = K.mean(K.categorical_crossentropy(s2_in, ps2, from_logits=True)) loss = loss1 + loss2 return loss train_model.compile(optimizer=Adam(1e-3),loss=myloss)...
I was able to reproduce your code successfully, but I found that you have extracted the features of the images using VGG-16 and saved them in the photo_features folder. Could...
请问您有COAE2008 dataset2的数据集吗?