Visualisierung 2 CNN
Layer Class Referenceabstract

Base class for the layer component. More...

Inheritance diagram for Layer:
ConvLayer FCLayer ImageLayer MaxPoolLayer

Public Member Functions

abstract List< List< Shape > > GetLineStartShapes (Vector2Int convShape, Vector2Int outputShape, Vector2 theoreticalOutputShape, Vector2Int stride, float allCalcs)
 
abstract Vector3Int GetOutputShape ()
 
 Layer ()
 
virtual void Init ()
 
virtual void SetExpansion (float expansion)
 
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...
 
virtual void CalcMesh ()
 Calculates and sets the mesh of the Layers game object. 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...
 

Static Public Member Functions

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...
 

Public Attributes

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

abstract List< ShapeGetPointShapes ()
 
virtual void SubUpdate ()
 
virtual void UpdateForParams ()
 
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...
 

Protected Attributes

Layer _inputLayer
 
Mesh _mesh
 
Renderer _renderer
 
bool _initialized = false
 
Vector2Int _tempRes = new Vector2Int(5, 5)
 
bool renderColored = false
 

Detailed Description

Base class for the layer component.

Constructor & Destructor Documentation

◆ Layer()

Layer.Layer ( )

Member Function Documentation

◆ AddNodes()

virtual void Layer.AddNodes ( List< Vector3 >  verts,
List< int >  inds 
)
protectedvirtual

Adds the "pixels" to the mesh.

Parameters
verts
inds

◆ AddObserver()

void Layer.AddObserver ( Layer  observer)

Adds an observer to be notified on parameter changes on this layer to allow downstream updated of dependent layers.

Parameters
observer

◆ CalcMesh()

virtual void Layer.CalcMesh ( )
virtual

Calculates and sets the mesh of the Layers game object.

Reimplemented in ConvLayer, FCLayer, MaxPoolLayer, and ImageLayer.

◆ CenterPosition()

Vector3 Layer.CenterPosition ( )

Just returns a Vector on the Z Axis with the correct z positon.

Returns

◆ Get2DOutputShape()

virtual Vector2Int Layer.Get2DOutputShape ( )
virtual

Returns a 2d Vector of the layers output shape.

Returns

Reimplemented in ConvLayer, MaxPoolLayer, and ImageLayer.

◆ GetEdgeBundleCenter()

Vector3 Layer.GetEdgeBundleCenter ( Vector3  originalPoint,
float  edgeBundle 
)
protected

Returns the edgebundle position for the corresponding point.

Parameters
originalPoint
edgeBundle
Returns

◆ GetInputLayer()

Layer Layer.GetInputLayer ( )

Get the input layer of this Layer.

Returns

◆ GetLineStartShapes()

abstract List<List<Shape> > Layer.GetLineStartShapes ( Vector2Int  convShape,
Vector2Int  outputShape,
Vector2  theoreticalOutputShape,
Vector2Int  stride,
float  allCalcs 
)
pure virtual

Implemented in ImageLayer, ConvLayer, FCLayer, and MaxPoolLayer.

◆ GetMultiDimIndices()

static int [] Layer.GetMultiDimIndices ( int []  shape,
int  singleDimInd 
)
static

Returns a multi dimensional index from a single dimensional one based on the shape of the multidimensional array.

Parameters
shape
singleDimInd
Returns

◆ GetOutputShape()

abstract Vector3Int Layer.GetOutputShape ( )
pure virtual

Implemented in FCLayer, ConvLayer, MaxPoolLayer, and ImageLayer.

◆ GetPadding()

Vector2Int Layer.GetPadding ( )

Calculates rounded padding based on filter size.

Returns

◆ GetPointShapes()

abstract List<Shape> Layer.GetPointShapes ( )
protectedpure virtual

Implemented in ImageLayer, ConvLayer, FCLayer, and MaxPoolLayer.

◆ Init()

virtual void Layer.Init ( )
virtual

◆ NotifyObservers()

void Layer.NotifyObservers ( )

Notifies obsevers that a parameter change has occured.

◆ OnValidate()

void Layer.OnValidate ( )
protected

Called after each parameter change in the editor. Contains main update procedures.

◆ RemoveObserver()

void Layer.RemoveObserver ( Layer  observer)

Removes an observer.

Parameters
observer

◆ SetEpoch()

void Layer.SetEpoch ( int  epoch)

Set the epoch of this layer to load the correct tensor values in the mesh calculation procedure.

Parameters
epoch

◆ SetExpansion()

virtual void Layer.SetExpansion ( float  expansion)
virtual

Reimplemented in ConvLayer, MaxPoolLayer, ImageLayer, and FCLayer.

◆ SubUpdate()

virtual void Layer.SubUpdate ( )
protectedvirtual

Reimplemented in ConvLayer, FCLayer, and MaxPoolLayer.

◆ UpdateForParams()

virtual void Layer.UpdateForParams ( )
protectedvirtual

Reimplemented in ConvLayer, FCLayer, MaxPoolLayer, and ImageLayer.

◆ ZPosition()

float Layer.ZPosition ( )
protected

Recursively returns the right ZOffset based on input layers.

Returns
Z Base Position

Member Data Documentation

◆ _initialized

bool Layer._initialized = false
protected

◆ _input

GameObject Layer._input

◆ _inputLayer

Layer Layer._inputLayer
protected

◆ _mesh

Mesh Layer._mesh
protected

◆ _renderer

Renderer Layer._renderer
protected

◆ _scale

float Layer._scale = 1.0f

◆ _tempRes

Vector2Int Layer._tempRes = new Vector2Int(5, 5)
protected

◆ epoch

int Layer.epoch = 0

◆ padding

bool Layer.padding = true

◆ pointBrightness

float Layer.pointBrightness = 1.0f

◆ reducedShape

Vector2Int Layer.reducedShape

◆ renderColored

bool Layer.renderColored = false
protected

◆ stride

Vector2Int Layer.stride = new Vector2Int(1, 1)

◆ zOffset

float Layer.zOffset = 1.0f

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