Sha256: b6123a46a08ac0c61b2f1c80c769c4bcb9c7d3e72d72a97e44aaf0c4385b0346
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
module TensorStream module Train # High Level implementation of the gradient descent algorithm class GradientDescentOptimizer < Optimizer include TensorStream::OpHelper attr_accessor :learning_rate def initialize(learning_rate, use_locking: false, name: "GradientDescent") @learning_rate = learning_rate super(name: name, use_locking: use_locking) end protected def apply_dense(grad, var) i_op(:apply_gradient_descent, var, TensorStream.cast(@learning_rate, grad.data_type), grad) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tensor_stream-0.8.1 | lib/tensor_stream/train/gradient_descent_optimizer.rb |