Package deepboof.impl.forward.standard
Class FunctionLinear_F32
java.lang.Object
deepboof.impl.forward.standard.BaseFunction<Tensor_F32>
deepboof.impl.forward.standard.FunctionLinear_F32
- All Implemented Interfaces:
FunctionLinear<Tensor_F32>,Function<Tensor_F32>
public class FunctionLinear_F32
extends BaseFunction<Tensor_F32>
implements FunctionLinear<Tensor_F32>
Implementation of
FunctionLinear for Tensor_F32.-
Field Summary
FieldsFields inherited from class deepboof.impl.forward.standard.BaseFunction
miniBatchSize, parameters, shapeInput, shapeOutput, shapeParameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid_forward(Tensor_F32 input, Tensor_F32 output) voidvoid_setParameters(List<Tensor_F32> parameters) static voidforwards(Tensor_F32 input, Tensor_F32 output, Tensor_F32 weight, Tensor_F32 bias, int miniBatchSize, int D, int M) intReturns the number of output elements.Returns the type of tensor it can processMethods inherited from class deepboof.impl.forward.standard.BaseFunction
forward, getOutputShape, getParameters, getParameterShapes, initialize, setParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface deepboof.Function
getOutputShape, getParameters, getParameterShapes, initializeMethods inherited from interface deepboof.forward.FunctionLinear
forward, setParameters
-
Field Details
-
D
protected int D -
M
protected int M
-
-
Constructor Details
-
FunctionLinear_F32
public FunctionLinear_F32(int numberOfOutputs)
-
-
Method Details
-
_forward
- Specified by:
_forwardin classBaseFunction<Tensor_F32>
-
forwards
public static void forwards(Tensor_F32 input, Tensor_F32 output, Tensor_F32 weight, Tensor_F32 bias, int miniBatchSize, int D, int M) -
_initialize
public void _initialize()- Specified by:
_initializein classBaseFunction<Tensor_F32>
-
_setParameters
- Specified by:
_setParametersin classBaseFunction<Tensor_F32>
-
getNumberOfOutputs
public int getNumberOfOutputs()Description copied from interface:FunctionLinearReturns the number of output elements. This is the variable M.- Specified by:
getNumberOfOutputsin interfaceFunctionLinear<Tensor_F32>- Returns:
- Number of output elements.
-
getTensorType
Description copied from interface:FunctionReturns the type of tensor it can process- Specified by:
getTensorTypein interfaceFunction<Tensor_F32>- Returns:
- Type of tensor
-