vae.fit({'sketch_features': train_sketch_X, 'image_features': train_X_img, 'image_neg_features': image_neg_features}, [train_X_img, train_sketch_X, image_neg_features], batch_size=BATCH_SIZE, epochs=MAX_EPOCH)
Выше приведен функционал API
def vae_loss_wrapper(image_neg_features):
def vae_loss(y_true, y_pred):
recon = triplet_loss([y_true, y_pred, image_neg_features])
kl = 0.5 * K.sum(K.exp(log_sigma) + K.square(mu) - 1. - log_sigma, axis=1)
return recon + kl
return vae_loss
Можно ли ввести image_neg_features и просто использовать его для расчета потерь?Любая помощь будет высоко ценится