18 #ifndef itkLayerBase_h
19 #define itkLayerBase_h
37 template<
typename TMeasurementVector,
typename TTargetVector>
52 typedef typename TMeasurementVector::ValueType
ValueType;
65 typedef enum { INVALIDLAYER=0, INPUTLAYER=1, HIDDENLAYER=2, OUTPUTLAYER=3 } LayerTypeCode;
67 virtual void SetNumberOfNodes(
unsigned int);
68 unsigned int GetNumberOfNodes()
const;
70 virtual ValueType GetInputValue(
unsigned int)
const = 0;
71 virtual ValueType GetOutputValue(
unsigned int)
const = 0;
72 virtual ValuePointer GetOutputVector() = 0;
80 virtual ValueType GetOutputErrorValue(
unsigned int)
const = 0;
83 virtual ValueType GetInputErrorValue(
unsigned int)
const = 0;
84 virtual ValuePointer GetInputErrorVector() = 0;
88 void SetInputWeightSet(WeightSetInterfaceType*);
89 itkGetModifiableObjectMacro(InputWeightSet, WeightSetInterfaceType);
92 void SetOutputWeightSet(WeightSetInterfaceType*);
93 itkGetModifiableObjectMacro(OutputWeightSet, WeightSetInterfaceType);
95 void SetNodeInputFunction(InputFunctionInterfaceType* f);
96 itkGetModifiableObjectMacro(NodeInputFunction, InputFunctionInterfaceType);
98 void SetTransferFunction(TransferFunctionInterfaceType* f);
99 itkGetModifiableObjectMacro(ActivationFunction, TransferFunctionInterfaceType);
101 virtual ValueType Activation(ValueType) = 0;
102 virtual ValueType DActivation(ValueType) = 0;
104 itkSetEnumMacro(LayerTypeCode, LayerTypeCode);
105 itkGetEnumMacro(LayerTypeCode, LayerTypeCode);
108 #ifdef __USE_OLD_INTERFACE
109 void SetLayerType(
const LayerTypeCode value) { SetLayerTypeCode(value); }
110 LayerTypeCode GetLayerType(
void) {
return GetLayerTypeCode(); }
112 void SetLayerType(
const unsigned int value)
117 SetLayerType(INVALIDLAYER);
120 SetLayerType(INPUTLAYER);
123 SetLayerType(HIDDENLAYER);
126 SetLayerType(OUTPUTLAYER);
134 itkSetMacro(LayerId,
unsigned int);
135 itkGetConstReferenceMacro(LayerId,
unsigned int);
142 ~LayerBase() ITK_OVERRIDE;
145 virtual
void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
148 unsigned int m_LayerId;
149 unsigned int m_NumberOfNodes;
162 #ifndef ITK_MANUAL_INSTANTIATION
163 #include "itkLayerBase.hxx"
Array class with size defined at construction time.
This is the itkLayerBase class.
This is the itkWeightSetBase class.
This is the itkTransferFunctionBase class.
virtual void SetOutputErrorValues(TTargetVector)
LayerBase LayerInterfaceType
SmartPointer< Self > Pointer
TTargetVector OutputVectorType
TMeasurementVector InputVectorType
TMeasurementVector::ValueType ValueType
virtual void BackwardPropagate(InternalVectorType)
virtual void BackwardPropagate()
virtual void ForwardPropagate()
const ValueType * ValueConstPointer
SmartPointer< const Self > ConstPointer
virtual void ForwardPropagate(TMeasurementVector)
WeightSetBase< TMeasurementVector, TTargetVector > WeightSetType
vnl_vector< ValueType > NodeVectorType
LightProcessObject Superclass
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Array< ValueType > InternalVectorType
InputFunctionBase< ValueType *, ValueType > InputFunctionInterfaceType
WeightSetBase< TMeasurementVector, TTargetVector > WeightSetInterfaceType
virtual void SetInputErrorValue(ValueType, unsigned int)
TransferFunctionBase< ValueType > TransferFunctionInterfaceType