Vol
Store a 3D volume of numbers with width(sx), height(sy), depth(depth) for the network. It also holds weights and gradients w.r.t the weights.
Constructor Summary
| Public Constructor | ||
| public |
|
|
Method Summary
| Public Methods | ||
| public |
Address the node and add the given |
|
| public |
Add the weights of a given network |
|
| public |
addFromScaled(volume: Vol, alpha: number) Add the weights of a given network |
|
| public |
Address the node and add the given |
|
| public |
Return a clone of current network with the same parameters, only reset gradients to 0 |
|
| public |
cloneAndZero(): Vol Return a clone of current network and initialize the weights and gradients as 0 |
|
| public |
fromJSON(obj: VolInterface) Reset the netwrok information parameters informations |
|
| public |
Address the node and return its weight. |
|
| public |
getNodeIndex(x: number, y: number, d: number): number Address the node by given |
|
| public |
Address the node and return its gradient. |
|
| public |
Initialize the network input placeholders and parameters
|
|
| public |
Address the node and reset its weight to the given |
|
| public |
Reset the weights of current network to a given constant number |
|
| public |
Address the node and reset its gradient to the given |
|
| public |
toJSON(): VolInterface Expose the netwrok parameters information |
|
Public Constructors
public constructor() source
Public Methods
public add(x: number, y: number, d: number, v: number) source
Address the node and add the given value(v) to its weight.
public addFrom(volume: Vol) source
Add the weights of a given network volume to current network
Params:
| Name | Type | Attribute | Description |
| volume | Vol |
public addFromScaled(volume: Vol, alpha: number) source
Add the weights of a given network volume with scale alpha to current network
public add_grad(x: number, y: number, d: number, v: number) source
Address the node and add the given value(v) to its gradient.
public clone(): Vol source
Return a clone of current network with the same parameters, only reset gradients to 0
public cloneAndZero(): Vol source
Return a clone of current network and initialize the weights and gradients as 0
public fromJSON(obj: VolInterface) source
Reset the netwrok information parameters informations
Params:
| Name | Type | Attribute | Description |
| obj | VolInterface |
public getNodeIndex(x: number, y: number, d: number): number source
Address the node by given width(x), height(y) and depth(d), then return the index of this node in the flatten 1D list.
public get_grad(x: number, y: number, d: number): number source
Address the node and return its gradient.
public init(sx: undefined, sy: undefined, depth: number, c: number) source
Initialize the network input placeholders and parameters
- If the given
widthis an array, we assume that 1D volume is provided - If the given
width/height/depthare allnumber, it will be treated as a 3D vlumn
public set(x: number, y: number, d: number, v: number) source
Address the node and reset its weight to the given value(v).
public setConst(value: number) source
Reset the weights of current network to a given constant number value
Params:
| Name | Type | Attribute | Description |
| value | number |