vgslify.tensorflow package
Submodules
vgslify.tensorflow.layers module
- class vgslify.tensorflow.layers.TensorFlowLayerFactory(input_shape=None)[source]
Bases:
LayerFactory
TensorFlowLayerFactory is responsible for creating TensorFlow-specific layers based on parsed VGSL (Variable-size Graph Specification Language) specifications.
This factory handles the creation of various types of layers, including convolutional layers, pooling layers, RNN layers, dense layers, activation layers, and more.
- layers
A list of TensorFlow layers that have been added to the factory.
- Type:
list
- shape
The current shape of the tensor, excluding the batch size.
- Type:
tuple of int
- _input_shape
The original input shape provided during initialization.
- Type:
tuple of int or None
- build(name='VGSL_Model')[source]
Build the final model using the accumulated layers.
- Parameters:
name (str, optional) – The name of the model, by default “VGSL_Model”
- Returns:
The constructed TensorFlow model.
- Return type:
tf.keras.models.Model
- Raises:
ValueError – If no layers have been added to the model.
ValueError – If no input shape has been specified for the model.