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
Fields inherited from class deepboof.impl.forward.standard.BaseFunction
miniBatchSize, parameters, shapeInput, shapeOutput, shapeParameters -
Constructor Summary
Constructors Constructor Description FunctionLinear_F32(int numberOfOutputs) -
Method Summary
Modifier and Type Method Description void_forward(Tensor_F32 input, Tensor_F32 output)void_initialize()void_setParameters(java.util.List<Tensor_F32> parameters)static voidforwards(Tensor_F32 input, Tensor_F32 output, Tensor_F32 weight, Tensor_F32 bias, int miniBatchSize, int D, int M)intgetNumberOfOutputs()Returns the number of output elements.java.lang.Class<Tensor_F32>getTensorType()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, initialize
-
Field Details
-
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
-