rindow
  • Projects
    Neural Networks Mathematics Framework
  • Blog
  • About

Rindow Neural Networks

Neural networks library for PHP

  1. Rindow Neural Networks
  2. API reference
  3. SGD

SGD

  • namespace: Rindow\NeuralNetworks\Optimizer
  • classname: SGD

Stochastic gradient descent and momentum optimizer.

Methods

constructor

$builer->SGD(
    float $lr=0.01,
)

You can create a SGD optimizer instances with the Optimizer Builder.

Options

  • lr: learning rate.
    • float >= 0
    • default is 0.01

Examples

$model->compile(
    optimizer:$nn->optimizers()->SGD(lr:0.01),
);
  • Previous
  • Up
  • Next
Huber
Adam

Search

Contents

  • Home
    • Overview
    • Why do deep learning with PHP?
    • Requirements
    • Note
  • Getting started
  • Installation
  • Tutorials
    • Basic image clasification on PHP
    • Convolutional Neural Network(CNN) on PHP
    • Learning to add numbers with seq2seq on PHP
    • Neural machine translation with attention on PHP
    • Neural machine translation with transformer on PHP
  • How to guide
    • Builders
      • Root Builder
      • Subclass Builders
    • How to use Sequential model
      • Sequential model
      • Specifying the input shape
      • Compilation
      • Training
      • Survey
      • Prediction
    • How to create a custom model
      • Custom model
      • Compilation
      • Training
      • Survey
      • Prediction
    • Automatic Differentiation
      • Automatic Differentiation and Gradients
      • Variables
      • Functions
      • Gradient Calculation
      • Model training
      • Compiling the computational graph
  • API reference

rindow™(2025) All rights reserved.

  • About