Visualisierung 2 CNN
FCLayer Class Reference

Represents a Fully Connected Layer of a CNN. More...

Inheritance diagram for FCLayer:
Layer

Public Member Functions

 FCLayer ()
 
override void SetExpansion (float expansion)
 
override List< List< Shape > > GetLineStartShapes (Vector2Int convShape, Vector2Int outputShape, Vector2 theoreticalOutputShape, Vector2Int stride, float allCalcs)
 Calculates and returns the positions of the line start points (for the CalcMesh() function) More...
 
override void CalcMesh ()
 Calculates and sets the mesh of the Layers game object. More...
 
override Vector3Int GetOutputShape ()
 
void SetTensorForEpoch (Array tensor, int epoch)
 
Array GetTensorForEpoch (int epoch)
 
void SetTensorShape (int[] tensorShape)
 
int [] GetTensorShape ()
 
void SetActivationTensorForEpoch (Array tensor, int epoch)
 
Array GetActivationTensorForEpoch (int epoch)
 
void SetActivationTensorShape (int[] tensorShape)
 
int [] GetActivationTensorShape ()
 
- Public Member Functions inherited from Layer
 Layer ()
 
virtual void Init ()
 
Vector3 CenterPosition ()
 Just returns a Vector on the Z Axis with the correct z positon. More...
 
Vector2Int GetPadding ()
 Calculates rounded padding based on filter size. More...
 
virtual Vector2Int Get2DOutputShape ()
 Returns a 2d Vector of the layers output shape. More...
 
void AddObserver (Layer observer)
 Adds an observer to be notified on parameter changes on this layer to allow downstream updated of dependent layers. More...
 
void RemoveObserver (Layer observer)
 Removes an observer. More...
 
void NotifyObservers ()
 Notifies obsevers that a parameter change has occured. More...
 
Layer GetInputLayer ()
 Get the input layer of this Layer. More...
 
void SetEpoch (int epoch)
 Set the epoch of this layer to load the correct tensor values in the mesh calculation procedure. More...
 

Public Attributes

int temp_maxHRuns = 1
 
int temp_maxIRuns = 1
 
int temp_maxJRuns = 1
 
int temp_maxKRuns = 1
 
int reducedDepth = 16
 
int fullDepth = 1024
 
float filterSpread
 
float filterSpacing
 
float lineCircleGrid
 
float edgeBundle
 
float collapseInput
 
float lineXToZ
 
float nodeSize
 
bool showOriginalDepth
 
- Public Attributes inherited from Layer
GameObject _input
 
Vector2Int reducedShape
 
Vector2Int stride = new Vector2Int(1, 1)
 
bool padding = true
 
float pointBrightness = 1.0f
 
float zOffset = 1.0f
 
float _scale = 1.0f
 
int epoch = 0
 

Protected Member Functions

override void SubUpdate ()
 
override void UpdateForParams ()
 Checks if parameters have been updated and reinitializes necessary data. More...
 
override List< ShapeGetPointShapes ()
 Returns a List of Shapes representing the pixels of the feature maps. More...
 
- Protected Member Functions inherited from Layer
float ZPosition ()
 Recursively returns the right ZOffset based on input layers. More...
 
void OnValidate ()
 Called after each parameter change in the editor. Contains main update procedures. More...
 
virtual void AddNodes (List< Vector3 > verts, List< int > inds)
 Adds the "pixels" to the mesh. More...
 
Vector3 GetEdgeBundleCenter (Vector3 originalPoint, float edgeBundle)
 Returns the edgebundle position for the corresponding point. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Layer
static int [] GetMultiDimIndices (int[] shape, int singleDimInd)
 Returns a multi dimensional index from a single dimensional one based on the shape of the multidimensional array. More...
 
- Protected Attributes inherited from Layer
Layer _inputLayer
 
Mesh _mesh
 
Renderer _renderer
 
bool _initialized = false
 
Vector2Int _tempRes = new Vector2Int(5, 5)
 
bool renderColored = false
 

Detailed Description

Represents a Fully Connected Layer of a CNN.

Constructor & Destructor Documentation

◆ FCLayer()

FCLayer.FCLayer ( )

Member Function Documentation

◆ CalcMesh()

override void FCLayer.CalcMesh ( )
virtual

Calculates and sets the mesh of the Layers game object.

Reimplemented from Layer.

◆ GetActivationTensorForEpoch()

Array FCLayer.GetActivationTensorForEpoch ( int  epoch)

◆ GetActivationTensorShape()

int [] FCLayer.GetActivationTensorShape ( )

◆ GetLineStartShapes()

override List<List<Shape> > FCLayer.GetLineStartShapes ( Vector2Int  convShape,
Vector2Int  outputShape,
Vector2  theoreticalOutputShape,
Vector2Int  stride,
float  allCalcs 
)
virtual

Calculates and returns the positions of the line start points (for the CalcMesh() function)

Parameters
convShape
outputShape
theoreticalOutputShape
stride
allCalcs
Returns

Implements Layer.

◆ GetOutputShape()

override Vector3Int FCLayer.GetOutputShape ( )
virtual

Implements Layer.

◆ GetPointShapes()

override List<Shape> FCLayer.GetPointShapes ( )
protectedvirtual

Returns a List of Shapes representing the pixels of the feature maps.

Returns

Implements Layer.

◆ GetTensorForEpoch()

Array FCLayer.GetTensorForEpoch ( int  epoch)

◆ GetTensorShape()

int [] FCLayer.GetTensorShape ( )

◆ SetActivationTensorForEpoch()

void FCLayer.SetActivationTensorForEpoch ( Array  tensor,
int  epoch 
)

◆ SetActivationTensorShape()

void FCLayer.SetActivationTensorShape ( int []  tensorShape)

◆ SetExpansion()

override void FCLayer.SetExpansion ( float  expansion)
virtual

Reimplemented from Layer.

◆ SetTensorForEpoch()

void FCLayer.SetTensorForEpoch ( Array  tensor,
int  epoch 
)

◆ SetTensorShape()

void FCLayer.SetTensorShape ( int []  tensorShape)

◆ SubUpdate()

override void FCLayer.SubUpdate ( )
protectedvirtual

Reimplemented from Layer.

◆ UpdateForParams()

override void FCLayer.UpdateForParams ( )
protectedvirtual

Checks if parameters have been updated and reinitializes necessary data.

Reimplemented from Layer.

Member Data Documentation

◆ collapseInput

float FCLayer.collapseInput

◆ edgeBundle

float FCLayer.edgeBundle

◆ filterSpacing

float FCLayer.filterSpacing

◆ filterSpread

float FCLayer.filterSpread

◆ fullDepth

int FCLayer.fullDepth = 1024

◆ lineCircleGrid

float FCLayer.lineCircleGrid

◆ lineXToZ

float FCLayer.lineXToZ

◆ nodeSize

float FCLayer.nodeSize

◆ reducedDepth

int FCLayer.reducedDepth = 16

◆ showOriginalDepth

bool FCLayer.showOriginalDepth

◆ temp_maxHRuns

int FCLayer.temp_maxHRuns = 1

◆ temp_maxIRuns

int FCLayer.temp_maxIRuns = 1

◆ temp_maxJRuns

int FCLayer.temp_maxJRuns = 1

◆ temp_maxKRuns

int FCLayer.temp_maxKRuns = 1

The documentation for this class was generated from the following file: