LayerPort
Layers · AiDotNet.NeuralNetworks.Layers
Declares a named input or output port on a layer. Ports enable multi-input layers (e.g., DiffusionResBlock needs “input” + “time_embed”) and provide compile-time documentation of a layer’s data contract.
Implements: IEquatable<LayerPort>
For Beginners
A port is like a labeled plug on the layer. Just as a TV has separate ports for HDMI, USB, and power, a neural network layer can have separate ports for different types of input data.
Constructors
| Constructor | Summary |
|---|---|
LayerPort(string Name, int[] Shape, bool Required, LayerInputDomain? ValueDomain, TensorPortRole Role, string StableId, TensorPortSource Source, string Variant, PortShapeConstraint ShapeConstraint) |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<int> Shape { get; } |
|
LayerInputDomain ValueDomain { get; } |
|
PortShapeConstraint ShapeConstraint { get; } |
|
TensorPortRole Role { get; } |
|
TensorPortSource Source { get; } |
|
bool Required { get; } |
|
string Name { get; } |
|
string StableId { get; } |
|
string Variant { get; } |
Methods
| Method | Summary |
|---|---|
LayerPort <Clone>$() |
|
bool Equals(LayerPort other) |
|
bool Equals(object obj) |
|
bool op_Equality(LayerPort left, LayerPort right) |
|
bool op_Inequality(LayerPort left, LayerPort right) |
|
int GetHashCode() |
|
string ToString() |