简体   繁体   English

Tensorflow - 奇怪的验证丢失行为

[英]Tensorflow - weird validation loss behaviour

My validation loss is behaving in a very weird way我的验证损失表现得非常奇怪

图片

What does this behaviour mean?这种行为是什么意思?

My network is a simple NN with two hidden layers of 100 nodes each, an input layer with 3 units and an output layer of 50 units.我的网络是一个简单的神经网络,有两个隐藏层,每个隐藏层有 100 个节点,一个有 3 个单元的输入层和一个有 50 个单元的输出层。 It is used to learn a mapping between a set of 3 coordinates to a time series of 50 time components.它用于学习一组 3 个坐标到 50 个时间分量的时间序列之间的映射。 There is one and one only time series possible for each triplet of coordinates.每个坐标三元组可能只有一个时间序列。 The aim is to train the network with a few samples, so that the network learns how to predict the time series associated to a generic triplet of coordinates.目的是用几个样本训练网络,以便网络学习如何预测与通用坐标三元组关联的时间序列。 This is the network这是网络

c = tf.placeholder(tf.float32, shape=[None, 3])    
act_f = getattr(tf.nn, 'leaky_relu')

def latent_P(coord):
    h2 = tf.layers.dense(coord, 100, activation=act_f)
    h1 = tf.layers.dense(h2, 100, activation=act_f)
    logits = tf.layers.dense(h1, 50)
    return logits

z_nn_samples = latent_P(c)

recon_loss_nn = tf.keras.losses.MAE(z, z_nn_samples)

loss_nn = tf.reduce_mean(recon_loss_nn)

solver_nn = tf.train.AdamOptimizer().minimize(loss_nn)

My training set is made of 3000 time series (with their respective 3000 triplets of coordinates).我的训练集由 3000 个时间序列组成(分别有 3000 个坐标三元组)。 The validation set is made of 500 time series/ coordinates.验证集由 500 个时间序列/坐标组成。

训练和验证数据的分布不同和/或您过度拟合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM