ONE - On-device Neural Engine
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
w
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
k
l
m
n
o
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
u
v
w
y
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
a
c
d
e
f
g
i
k
l
m
o
p
r
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Symbols
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Variables
_
b
c
d
f
g
i
k
m
n
o
p
s
t
v
Typedefs
a
d
f
g
i
l
m
n
o
s
t
u
v
Enumerations
f
g
n
o
p
r
Enumerator
a
k
n
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
sgd.py
Go to the documentation of this file.
1
from
.optimizer
import
Optimizer
2
3
4
class
SGD
(
Optimizer
):
5
"""
6
Stochastic Gradient Descent (SGD) optimizer.
7
"""
8
def
__init__
(self, learning_rate=0.001, momentum=0.0):
9
"""
10
Initialize the SGD optimizer.
11
Args:
12
learning_rate (float): The learning rate for optimization.
13
momentum (float): Momentum factor (default: 0.0).
14
"""
15
super().
__init__
(learning_rate)
16
17
if
momentum != 0.0:
18
raise
NotImplementedError(
19
"Momentum is not supported in the current version of SGD."
)
20
self.
momentum
= momentum
21
self.
velocity
=
None
8
def
__init__
(self, learning_rate=0.001, momentum=0.0):
…
4
class
SGD
(
Optimizer
):
…
optimizer.optimizer.Optimizer
Definition
optimizer.py:4
optimizer.sgd.SGD
Definition
sgd.py:4
optimizer.sgd.SGD.__init__
__init__(self, learning_rate=0.001, momentum=0.0)
Definition
sgd.py:8
optimizer.sgd.SGD.velocity
velocity
Definition
sgd.py:21
optimizer.sgd.SGD.momentum
momentum
Definition
sgd.py:20
runtime
onert
api
python
package
experimental
train
optimizer
sgd.py
Generated by
1.9.8