TensorFlow Generator¶
This module defines the TFGenerator class that generates TF code for neural networks based on the B-UML model.
- class besser.generators.nn.tf.tf_code_generator.TFGenerator(model: NN, output_dir: str | None = None, generation_type: str = 'subclassing')[source]¶
Bases:
NNCodeGeneratorTFGenerator is a class that inherits from NNCodeGenerator. It generates TF code for neural networks training and evaluation based on the B-UML input model.
- Parameters:
model (NN) – An instance of the NN Model class representing the B-UML model.
setup_layer (SetupLayerSyntax) – The class that defines the syntax of layers.
setup_tensorop (Callable) – The function that defines the syntax of tensorops.
output_dir (str, optional) – The output directory where the generated code will be saved. Defaults to None.
file_name (str) – The name of the file where the generated code is stored.
template_dir (str) – The name of the jinja template directory.
generation_type (str) – ‘subclassing’ or ‘sequential’.
- _abc_impl = <_abc._abc_data object>¶