beatmup.nnets.DeserializedModel¶
- class beatmup.nnets.DeserializedModel¶
Model reconstructed from a serialized representation. The representation format is the one rendered with Model::serialize(): a YAML-like listing containing “ops” and “connections” sections describing the model operations in execution order and connections between them respectively (see NNetsModelSerialization).
- __init__(self: beatmup.nnets.DeserializedModel, context: beatmup.Context, str: str) None ¶
Methods
__init__
(self, context, str)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.