Package org.apache.spark.ml.ann
Interface Layer
- All Superinterfaces:
- Serializable
Trait that holds Layer properties, that are needed to instantiate it.
 Implements Layer instantiation.
 
- 
Method SummaryModifier and TypeMethodDescriptioncreateModel(breeze.linalg.DenseVector<Object> initialWeights) Returns the instance of the layer based on weights provided.intgetOutputSize(int inputSize) Returns the output size given the input size (not counting the stack size).Returns the instance of the layer with random generated weights.booleaninPlace()If true, the memory is not allocated for the output of this layer.intNumber of weights that is used to allocate memory for the weights vector
- 
Method Details- 
createModelReturns the instance of the layer based on weights provided. Size of weights must be equal to weightSize- Parameters:
- initialWeights- vector with layer weights
- Returns:
- the layer model
 
- 
getOutputSizeint getOutputSize(int inputSize) Returns the output size given the input size (not counting the stack size). Output size is used to allocate memory for the output.- Parameters:
- inputSize- input size
- Returns:
- output size
 
- 
inPlaceboolean inPlace()If true, the memory is not allocated for the output of this layer. The memory allocated to the previous layer is used to write the output of this layer. Developer can set this to true if computing delta of a previous layer does not involve its output, so the current layer can write there. This also mean that both layers have the same number of outputs.- Returns:
- (undocumented)
 
- 
initModelReturns the instance of the layer with random generated weights.- Parameters:
- weights- vector for weights initialization, must be equal to weightSize
- random- random number generator
- Returns:
- the layer model
 
- 
weightSizeint weightSize()Number of weights that is used to allocate memory for the weights vector- Returns:
- (undocumented)
 
 
-