beatmup.nnets.Model

class beatmup.nnets.Model

Neural net model. Contains a list of operations and programmatically defined interconnections between them using addConnection(). Enables access to the model memory at any point in the model through addOutput() and getModelData(). The memory needed to store internal data during the inference is allocated automatically; storages are reused when possible. The inference of a Model is performed by InferenceTask.

__init__(self: beatmup.nnets.Model, context: beatmup.Context) None

Methods

__init__(self, context)

add_connection(self, source_op, dest_op[, ...])

Adds a connection between two given ops.

add_operation(self, op_name, new_op)

Adds a new operation to the model before another operation in the execution order.

add_output(*args, **kwargs)

Overloaded function.

append(self, new_op[, connect])

Adds a new operation to the model.

count_multiply_adds(self)

Provides an estimation of the number of multiply-adds characterizing the model complexity.

count_texel_fetches(self)

Provides an estimation of the total number of texels fetched by all the operations in the model per image.

get_first_operation(self)

Returns the first operation in the model

get_last_operation(self)

Returns the last operation in the model

get_output_data(*args, **kwargs)

Overloaded function.

serialize(self)

Returns serialized representation of the model as a string.