tf.tpu.experimental.StochasticGradientDescentParameters
Параметры оптимизации стохастического градиентного спуска для встраиваний TPU.
tf.tpu.experimental.StochasticGradientDescentParameters(
learning_rate, clip_weight_min=None, clip_weight_max=None
)
Передайте это в tf.estimator.tpu.experimental.EmbeddingConfigSpec через аргумент optimization_parameters, чтобы установить оптимизатор и его параметры. См. документацию по tf.estimator.tpu.experimental.EmbeddingConfigSpec для получения более подробной информации.
estimator = tf.estimator.tpu.TPUEstimator(
...
embedding_config_spec=tf.estimator.tpu.experimental.EmbeddingConfigSpec(
...
optimization_parameters=(
tf.tpu.experimental.StochasticGradientDescentParameters(0.1))))
| Аргументы | |
|---|---|
learning_rate | значение с плавающей запятой. Скорость обучения. |
clip_weight_min | минимальное значение для обрезки; None означает -бесконечность. |
clip_weight_max | максимальное значение для обрезки; None означает +бесконечность. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/tpu/experimental/StochasticGradientDescentParameters