unreal.NearestNeighborOptimizedNetwork

class unreal.NearestNeighborOptimizedNetwork(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

The specialized neural network for the MLDeformerModel. This class is used to do inference at runtime at a higher performance than using UNeuralNetwork.

C++ Source:

  • Plugin: NearestNeighborModel

  • Module: NearestNeighborModel

  • File: NearestNeighborOptimizedNetwork.h

add_layer(layer_type) NearestNeighborNetworkLayer

Add a network layer.

Parameters:

layer_type (int32) –

Returns:

A pointer to the layer, which will contain the parameters.

Return type:

NearestNeighborNetworkLayer

empty() None

Clear the network, getting rid of all layers.