Skip to content

Releases: TimKoornstra/VGSLify

v0.12.0

19 Sep 14:17
Compare
Choose a tag to compare

VGSLify v0.12.0 Release Notes

Release Date: September 2024

New Features and Improvements:

  1. Removal of Output Layer (O):

    • The O (output) layer has been removed from the VGSL spec. Users can now define the final layer of their model by specifying a fully connected (Fc) layer, with the ability to use Flt for linear activation or other activations as needed.
    • This change simplifies model definition by giving users more control over the architecture, especially for the output layer.

    Example:

    # Before:
    ... O1s10
    
    # Now:
    ... Fs10  # Define output with fully connected layer and activation
    
  2. Rewritten Spatial Collapse (Rc):

    • The spatial collapse functionality has been revised to support two types of collapses:
      • Rc2: Collapses spatial dimensions into a 2D tensor, suitable for transitioning into fully connected (dense) layers.
      • Rc3: Collapses spatial dimensions into a 3D tensor, making it compatible with sequential layers such as LSTMs or RNNs.
    • Users should choose Rc2 when transitioning to dense layers and Rc3 when continuing with layers that process sequential information.

    Example:

    # For fully connected layers:
    ... Cr3,3,64 Mp2,2,2,2 Rc2 Fc128
    
    # For sequential models:
    ... Cr3,3,64 Mp2,2,2,2 Rc3 Lfs50
    
  3. Updated Documentation:

  • The official documentation has been updated to reflect the changes to the Rc layer and the removal of the O layer.
  • New tutorials and examples have been added to guide users in updating their VGSL specs and taking advantage of the new features.
  • Documentation is available at: VGSLify Documentation.

v0.11.0

18 Sep 08:24
Compare
Choose a tag to compare

VGSLify v0.11.0 Release Notes

Release Date: September 2024

New Features and Improvements:

  1. Simplified Layer and Model Creation:

    • Automatic Layer Generation: Users can now generate individual layers from a VGSL spec string with the construct_layer() method. The generator automatically determines the correct layer type, making it easier to integrate VGSL-defined layers into existing models.
    • Layer History Inspection: A new generate_history() method allows users to inspect the sequence of layers generated from a VGSL spec without building or chaining them. This is particularly useful for debugging and experimenting with layer compositions.
  2. Improved Reshape Layer Handling:

    • Spatial Collapse (Rc): The generator now correctly distinguishes between spatial collapse (Rc) and general reshape operations (R{x,y,z}) based on the previous layer’s shape.
  3. Refactored and Streamlined API:

    • Single Class, Multiple Models: The VGSLModelGenerator now initializes without a model spec, allowing the same instance to be used for generating multiple models. You can pass different spec strings to methods like generate_model() or generate_history(), reducing the need to instantiate multiple generator objects.
  4. Enhanced Documentation and Usability:

    • README Updates: The documentation has been updated to reflect the new, simplified API. Users can now quickly generate models, individual layers, or inspect layer history using the streamlined methods.
    • Code Examples: The documentation now includes examples that demonstrate how to use the new features, including BYOB backend selection, individual layer generation, and history inspection.

Bug Fixes:

  • None Dimensions: Fixed an issue where the Reshape layer's target shape contained None dimensions, ensuring that such cases are handled correctly by substituting None with 1.

v0.10.1

17 Sep 13:47
Compare
Choose a tag to compare

VGSLify v0.10.1 Release Notes

Release Date: September 2024


This patch rewrites part of the main generator class, and readds the ability to use Rc to collapse the model dimensions.


Upgrade Instructions:

To upgrade to the latest version of VGSLify, use the following command:

pip install --upgrade vgslify

v0.10.0

04 Sep 17:55
Compare
Choose a tag to compare

VGSLify v0.10.0 Release Notes

Release Date: September 2024


I'm excited to announce VGSLify v0.10.0, which introduces several major improvements, refactors, and additional features that enhance flexibility and ease of use for both TensorFlow and PyTorch deep learning models. Below are the key highlights of this release.

🚀 New Features

1. Backend Auto-Detection

  • Automatic Backend Selection: The VGSLModelGenerator can now automatically detect the backend (TensorFlow or PyTorch) based on the environment. If both frameworks are available, TensorFlow will be selected by default.
  • Usage: The default backend can be set to auto, allowing VGSLify to choose the most appropriate backend.

2. TensorFlow to VGSL Spec Conversion

  • TensorFlow Model to VGSL Spec: Added functionality to convert TensorFlow models back into VGSL specification strings using the tf_to_spec function. This is useful for model interpretation, debugging, or saving model architecture in a compact format.

3. Refactored Layer Parsing

  • Cleaner Parsing Functions: Refactored the parsing of various layer types (e.g., Conv2D, Pooling, Dense, RNN) for cleaner and more consistent code across different layer types.
  • Expanded Layer Support: Added support for the Flatten, BatchNormalization, Reshape, Activation, and Dropout layers with more comprehensive parsing.

4. Improved Input Layer Parsing

  • Input Shape Flexibility: Now supports 1D, 2D, and 3D input shapes in the VGSL specification. This opens up support for time-series models, 2D image models, and even future extensions like 3D convolutions.

🔧 Refactoring and Code Quality Improvements

1. Factory and Layer Construction Refactor

  • Refactored the TensorFlowLayerFactory class for better modularity and flexibility. Each layer type is now handled by its own static method, making the layer construction process more readable and easier to maintain.
  • The VGSLModelGenerator now uses a dictionary of constructors for each layer type, improving extensibility and maintainability when adding new layers.

2. Unified model_to_spec Function

  • A new unified model_to_spec function can detect whether a model is a TensorFlow model or a PyTorch model. Currently, it supports TensorFlow models, with PyTorch model support planned for future releases.

3. More Robust Error Handling

  • Improved error messages and validation when parsing VGSL specification strings. If an unsupported layer or incorrectly formatted specification is encountered, clear error messages are provided.

🛠️ Bug Fixes

1. Dense Layer Specification Parsing

  • Fixed a bug in the parsing of dense layers where the activation function was incorrectly assumed to be part of the spec string when omitted.

2. TensorFlow Layers Activation

  • Corrected issues related to activation handling in various layers, ensuring consistency across layer types.

3. Backend Detection

  • Corrected an issue where the backend detection could fail in certain environments. This has been fixed to reliably detect and select the correct backend.

📚 Documentation and Examples

1. Updated Documentation

  • The documentation has been updated to reflect all the new features, including examples of automatic backend selection, new layer types, and model-to-VGSL conversion.

2. Example Usage

  • New examples and code snippets for creating models, converting models to VGSL specs, and generating individual layers.

⚙️ Testing Enhancements

1. Pytest Test Coverage

  • Expanded unit test coverage across the package using pytest. This includes tests for core functionality such as:
    • Layer factory methods
    • Model generation and backend detection
    • VGSL spec parsing
    • TensorFlow to VGSL spec conversion
  • Mocking support added for TensorFlow and PyTorch imports to improve test flexibility.

🛠️ Deprecations and Breaking Changes

1. Manual Backend Selection

  • Although you can still manually select the backend (TensorFlow or PyTorch), the preferred method is to use the auto backend option for automatic detection.

🛠️ Planned Future Work

1. PyTorch Model Support

  • Although not yet implemented, the groundwork has been laid for PyTorch model support. Future releases will include full conversion to VGSL spec from PyTorch models and VGSL spec-based model generation.

2. Custom Layers and Layer Extensions

  • Work is ongoing to support custom layers and extensions to the VGSL specification for more specialized models.

Upgrade Instructions:

To upgrade to the latest version of VGSLify, use the following command:

pip install --upgrade vgslify

v0.9.2

14 Oct 10:17
Compare
Choose a tag to compare

This release adds

  • Various minor bug fixes

v0.9.0

14 Oct 09:31
3718298
Compare
Choose a tag to compare

Initial Release 🎉