使用Tensorflow从相同数据中获得的预测输出是否不同? [英] Differents outputs from predictions using Tensorflow from same data?

查看:792
本文介绍了使用Tensorflow从相同数据中获得的预测输出是否不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从训练模型中进行预测时,我陷入了一个问题. 场景是:我训练了一个神经网络模型,以使用Tensorflow学习图片并对其进行分类.当我在Gcloud中训练时,它返回的结果与我在本地中训练时返回的结果不同.即使使用相同的OS,库和代码,它也会返回不同的输出.

I am caught in a problem here when I try to take the predictions from my training model. The scenario is: I train a neural network model to learn and classify pictures using Tensorflow. When I train in Gcloud, it returns a different results that when I train locally. Even using the same OS, libraries and code, it returns differents outputs.

我想到了一些问题:

我正在谈论的数据是我正在训练的图片.

The data I am talking about is the pictures I am using to train.

I)考虑到您使用的是同一台机器,每列相同的数据都会有所不同?

I) Considering that you are in the same machine, every train of same data will be different somehow?

II)在具有相同数据的不同机器中的火车行为会使预测返回不同的输出吗?

II) The act of train in different machines with same data makes the predictions returns different outputs?

谢谢!

推荐答案

训练神经网络是一个随机过程,每次训练都会得到略有不同的结果.例如,您输入数据的顺序将影响最终学习的权重.这取决于您在TensorFlow中配置模型的方式,但是通常混入输入,以便每次运行都以不同的顺序处理图像.

Training neural networks is a stochastic process and you will get slightly different results each time you train. For example, the order in which you feed the data will affect the final learned weights. It depends on how you configure your model in TensorFlow but usually the input is shuffled so that each run processes the images in a different order.

您的模型真的也在收敛吗?

Also is your model actually converging?

这篇关于使用Tensorflow从相同数据中获得的预测输出是否不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆