简体   繁体   English

Tensorflow.js 中的反向传播

[英]Backpropagation in Tensorflow.js

I am making an RNN for sentiment classification while using a many to one structure.我正在使用多对一结构制作用于情感分类的 RNN。 In order to make my RNN be able to run within an HTML file.为了使我的 RNN 能够在 HTML 文件中运行。

To make the question short and simple:为了使问题简短明了:

What is the Tensorflow.js equivalent of Tensorflow's (the python version) tf.train.GradientDescentOptimizer(1.0).minimize(loss) ?什么是 Tensorflow.js 等效于 Tensorflow(python 版本) tf.train.GradientDescentOptimizer(1.0).minimize(loss)

By gradient descent, you probably would prefer stochastic gradient descent (sampling random batches) and it would look like:通过梯度下降,您可能更喜欢随机梯度下降(抽样随机批次),它看起来像:

tf.train.stg(learningRate).minimize(loss)

Read more here: https://js.tensorflow.org/api/latest/#tf.train.Optimizer.minimize在此处阅读更多信息: https://js.tensorflow.org/api/latest/#tf.train.Optimizer.minimize

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

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