modelEvaluateSimpleFeedForwardNeuralNetwork
Extends from BaseClasses.BaseFeedForwardNeuralNet.
Information
This is a specialized version of the EvaluateGenericNeuralNetwork. It can be used for neural networks which use several scalar inputs and outputs. The user has to create the wanted inputs and has to connect them to the input of the block. This input has the same shape [batchSize, numberOfInputs] of the input used in the tensorflow model. The individual input have to be fed into the last dimension. A batch size can be used simultaniously calculation.
The example PipeLocalHeatTransfer_tflite uses this block.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nInputElements (from BaseNeuralNet) | product(inputSizes) | |
| Integer | nOutputElements (from BaseNeuralNet) | product(outputSizes) | |
| Selected Model | |||
| String | pathToAIModel (from BaseNeuralNet) | "" | Choose path to AI model |
| Tensor sizing | |||
| Integer | inputDimensions (from BaseNeuralNet) | 1 | Number of input dimension |
| Integer | inputSizes (from BaseNeuralNet) | {1} | Vector with size of tensor in each dimension |
| Integer | outputDimensions (from BaseNeuralNet) | 1 | Number of output dimension |
| Integer | outputSizes (from BaseNeuralNet) | {1} | Vector with size of tensor in each dimension |
| RNN Timing Settings | |||
| Boolean | stateful (from BaseNeuralNet) | false | Activate state handling for RNN with state in-/outputs |
| Real | samplePeriod (from BaseNeuralNet) | 0 | Fixed sample period for RNNs |
| Advanced › Performance | |||
| Integer | numberOfThreads (from BaseNeuralNet) | 1 | Number of threads used for inference (0: Number of CPU cores) |
| Input/Output Sizing | |||
| Integer | numberOfInputs (from BaseFeedForwardNeuralNet) | 1 | Number of Real Inputs |
| Integer | numberOfOutputs (from BaseFeedForwardNeuralNet) | 1 | Number of Real Outputs |
| Integer | batchSize (from BaseFeedForwardNeuralNet) | 1 | Number of parallel batched simulations |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput[size(array2DFlatteningModel.arrayIn, 1),size(array2DFlatteningModel.arrayIn, 2)] | arrayIn | ||
| Modelica.Blocks.Interfaces.RealOutput[size(array2DDeflatteningModel.arrayOut, 1),size(array2DDeflatteningModel.arrayOut, 2)] | arrayOut |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Internal.Utilities.RunInferenceFlatInput | runInference (from BaseGenericNeuralNet) | ||
| Internal.Utilities.SubModels.Array2DFlatteningModel | array2DFlatteningModel (from BaseFeedForwardNeuralNet) | ||
| Internal.Utilities.SubModels.Array2DDeflatteningModel | array2DDeflatteningModel (from BaseFeedForwardNeuralNet) |