connect
connect(pre, post, weights, bias=None, sparseness=1.0)
Connects two layers with a (sparse) weight matrix and optionally a bias vector.
Parameters
| pre |
Layer |
input layer. |
required |
| post |
Layer |
output layer. |
required |
| weights |
float | RandomDistribution |
float or RandomDistribution to create the weight matrix. |
required |
| bias |
float | RandomDistribution |
bias per post neuron. If None or False, no bias is used. Otherwise, can be a float or RandomDistribution. |
None |
| sparseness |
float |
density of the weight matrix. |
1.0 |
Returns
|
Projection |
a DenseProjection or SparseProjection instance. |