为什么Go语言中的TensorFlow没有找到与Python中相同的优化器?

huangapple go评论160阅读模式
英文:

Why TensorFlow in Go didn't find the optimizer as python?

问题

我是TensorFlowGo中的新手。

在我的第一个训练演示中有一些疑问。我只在Go的wrappers.go中找到了一个优化器。

但是我学习了Python的演示,它们有几个优化器,比如:

GradientDescentOptimizer
AdagradOptimizer
AdagradDAOptimizer
MomentumOptimizer
AdamOptimizer
FtrlOptimizer
RMSPropOptimizer

这些函数的类似前缀是ResourceApply... GradientDescent Adagrad AdagradDA Momentum Adam Ftrl RMSProp

它们返回一个选项,我不知道它们的目的是什么。我找不到它们与优化器之间的关系。

Go中如何使用TensorFlow进行训练?

Go中,我应该使用类似Python的tf.Variable的什么东西?

英文:

I am a newbie of TensorFlow in Go.

There are some doubts during my first traing demo. I just find one optimizer in Go's wrappers.go.

But i learn the demos of python,they has serveral optimizers. Like

GradientDescentOptimizer
AdagradOptimizer
AdagradDAOptimizer
MomentumOptimizer
AdamOptimizer
FtrlOptimizer
RMSPropOptimizer

The similar prefix of func like ResourceApply...
GradientDescent
Adagrad
AdagradDA
Momentum
Adam
Ftrl
RMSProp
.

And they return a option.I don't know what are their purpose. I cant find the relation of them and optimizer.

And how can i make a train in Go by TensorFlow.

What should I should use like python's tf.Variable in Go?

答案1

得分: 0

你无法使用Go训练Tensorflow模型。

你唯一能做的是加载一个预训练的模型,并用它进行推理。

由于Go实现缺乏Variable支持,所以目前无法进行训练。

英文:

You can't train a Tensorflow model using Go.

The only thing you can do is load a pre-trained model and use it for the inference.

You can't because the Go implementation lacks the Variable support, therefore it's impossible to train anything at the moment.

huangapple
  • 本文由 发表于 2017年9月16日 10:59:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/46249621.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定