helblazer811 / ManimML

ManimML is a project focused on providing animations and visualizations of common machine learning concepts with the Manim Community Library.
MIT License
2.27k stars 136 forks source link

Nested Neural Networks #20

Open helblazer811 opened 1 year ago

helblazer811 commented 1 year ago

It would be nice to allow a user to pass a neural network into another neural network and have it be treated as a layer when constructing animations or renderings. It could look something like:

nested_network = NeuralNetwork([
     ImageLayer(),
     NeuralNetwork([
           Convolutional3DLayer(),
           Convolutional3DLayer(),
     ])
     FeedForwardLayer()
])
helblazer811 commented 1 year ago

I think this would be a great way to implement certain custom layers like Transformer Self-Attention (#11) under the hood.