[英]2 outputs in Keras model but only one with missing value?
I'd like to model two variables simultaneously using the same features at the input layer (a feed-forward network), but there are missing values in one of them .我想在输入层(前馈网络)使用相同的特征同时对两个变量进行建模,但其中一个缺少值。 I'm wondering if there is a way to mask the missing values when computing loss functions in Keras, bacause I don't want to delete Target 1 values at the index of missing Taregt 2 values during preprocessing.
我想知道在 Keras 中计算损失函数时是否有办法掩盖缺失值,因为我不想在预处理期间删除缺失 Taregt 2 值索引处的 Target 1 值。
You can do some data processing and either drop the NaN values or fill them with the average value.您可以进行一些数据处理,然后删除 NaN 值或用平均值填充它们。 You can have a look at this https://towardsdatascience.com/data-preprocessing-concepts-fa946d11c82
你可以看看这个https://towardsdatascience.com/data-preprocessing-concepts-fa946d11c82
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.