Comments (3)
Here is some code I wrote for a generic model training class in manim:
`from manim import *
class ModelTraining(Scene):
def construct(self):
model_title = TextMobject("Model Training")
self.play(Write(model_title))
self.wait()
training_data = TextMobject("Training Data")
self.play(Write(training_data))
self.wait()
model_training = TextMobject("Training the Model")
self.play(Write(model_training))
self.wait()
accuracy = TextMobject("Accuracy:")
accuracy_value = TextMobject("100%")
accuracy_group = VGroup(accuracy, accuracy_value)
accuracy_group.arrange(RIGHT)
accuracy_group.to_edge(UP)
self.play(Write(accuracy_group))
self.wait()
testing_data = TextMobject("Testing Data")
self.play(Write(testing_data))
self.wait()
model_testing = TextMobject("Testing the Model")
self.play(Write(model_testing))
self.wait()
test_accuracy = TextMobject("Test Accuracy:")
test_accuracy_value = TextMobject("99%")
test_accuracy_group = VGroup(test_accuracy, test_accuracy_value)
test_accuracy_group.arrange(RIGHT)
test_accuracy_group.to_edge(UP)
self.play(Write(test_accuracy_group))
self.wait()
`
from manimml.
Here is an example of a simple transformer model implemented which inherits from this class:
`from manim import *
class TransformerModelScene(ModelTrainingScene):
def init(self, **kwargs):
ModelTrainingScene.init(self, **kwargs)
def setup(self):
self.prepare_data()
self.add_data_points()
self.add_transformer_model()
def prepare_data(self):
# Prepare the data for the Transformer model
pass
def add_transformer_model(self):
# Add the Transformer model to the scene
pass
class TransformerModelTraining(Scene):
def construct(self):
self.add(TransformerModelScene())
`
In this example, TransformerModelScene is a subclass of ModelTrainingScene and inherits all of its methods and attributes. The setup method is overridden to prepare the data for the Transformer model and add the model to the scene.
In the TransformerModelScene class, the prepare_data and add_transformer_model methods need to be implemented to prepare the data for the Transformer model and add the model to the scene, respectively.
Finally, TransformerModelTraining is a scene that adds the TransformerModelScene to the animation.
from manimml.
Interesting ideas! I'm especially excited by the idea of creating more animations like ForwardPass with similar syntax to how the animations are done in the core library.
from manimml.
Related Issues (20)
- Layer Labeling and Dimension Labeling
- Nested Neural Networks HOT 1
- Clean up the namespace for layers HOT 1
- filename change in layers HOT 13
- Allow for passing layers as a dictionary. HOT 1
- Add a Convolutional Flatten Visualization
- Installing under Anaconda HOT 32
- correct the "First Neural Network" code HOT 4
- AttributeError: MaxPooling2DLayer object has no attribute 'padding' HOT 2
- Dropout Last Layer - Should have option to remove node removal HOT 5
- ManimML in docker HOT 3
- Color of Neural Networks HOT 3
- Misplacement of connections between neurons in NeuralNetworkScene HOT 5
- Increasing the size of the rendered NN HOT 3
- neural network title is fixed HOT 6
- missing "config" HOT 4
- 'size' has incorrect type (expected int, got float) HOT 13
- Wrong Image to Conv Animation HOT 1
- Missing manim_ml.diffusion.random_walk, dependency of diffusion process example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manimml.