HISE Docs

NeuralNetwork

You can create a NeuralNetwork object with Engine.createNeuralNetwork("String id") . Please take a look at the NeuralNetwork Sine Generator Snippet to take a look at a working example.

const var nn = Engine.createNeuralNetwork("NeuralNetwork");


Class methods

build

Create a network using the given JSON for the layer setup.

NeuralNetwork.build( var modelJSON)



clearModel

Destroys the model and allows rebuilding using a different layout JSON.

NeuralNetwork.clearModel()



connectToGlobalCables

Connects the network to a input and output global cable.

NeuralNetwork.connectToGlobalCables(String inputId, String outputId)



createModelJSONFromTextFile

Helper function to create a JSON model definition from the Pytorch print(model) output.

NeuralNetwork.createModelJSONFromTextFile(var fileObject)



getModelJSON

Returns the model JSON.

NeuralNetwork.getModelJSON()



loadPytorchModel

Loads the model layout and weights from a Pytorch model JSON.

NeuralNetwork.loadPytorchModel( var modelJSON)



loadTensorFlowModel

Loads the model layout and weights from a tensorflow model JSON.

NeuralNetwork.loadTensorFlowModel( var modelJSON)



loadWeights

Loads the weights from the JSON object.

NeuralNetwork.loadWeights( var weightData)



process

Runs inference on the given input and returns either a single float or a reference to the output buffer.

NeuralNetwork.process(var input)



reset

Resets the network pipeline.

NeuralNetwork.reset()