Documentation
¶
Overview ¶
Package variable provides a trainable variable type, analogous to tf.Variable.
Index ¶
- type Variable
- func (v *Variable) Assign(newValue *numgo.NDArray) error
- func (v *Variable) AssignAdd(delta *numgo.NDArray) error
- func (v *Variable) AssignSub(delta *numgo.NDArray) error
- func (v *Variable) ID() int64
- func (v *Variable) Name() string
- func (v *Variable) NumElements() int
- func (v *Variable) Shape() []int
- func (v *Variable) Trainable() bool
- func (v *Variable) Value() *numgo.NDArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
Variable represents a mutable NDArray that persists across calls. Analogous to tf.Variable.
func (*Variable) Assign ¶
Assign replaces the variable's value. The new value must have the same shape.
func (*Variable) AssignSub ¶
AssignSub subtracts an NDArray from the variable's current value in place.
func (*Variable) NumElements ¶
NumElements returns the total number of elements in the variable.
Click to show internal directories.
Click to hide internal directories.