Main Content
randnr
Normalized row weight initialization function
Syntax
W = randnr(S,PR)
Description
randnr
is a weight initialization function.
W = randnr(S,PR)
takes two inputs,
S | Number of rows (neurons) |
PR |
|
and returns an S
-by-R
random matrix with normalized
rows.
You can also call this in the form randnr(S,R)
.
Examples
A matrix of three normalized four-element rows is generated:
M = randnr(3,4) M = 0.9713 0.0800 -0.1838 -0.1282 0.8228 0.0338 0.1797 0.5381 -0.3042 -0.5725 0.5436 0.5331
Version History
Introduced before R2006a