Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct the "First Neural Network" code #26

Closed
chaoshengt opened this issue Jan 30, 2023 · 4 comments
Closed

correct the "First Neural Network" code #26

chaoshengt opened this issue Jan 30, 2023 · 4 comments

Comments

@chaoshengt
Copy link

Thank you for sharing your job! @helblazer811

The second line of the "First Neural Network"

from manim_ml.neural_network import Convolutional2DLayer, FeedForwardLayer, NeuralNetwork

should be changed as

from manim_ml.neural_network.layers import  Convolutional2DLayer, FeedForwardLayer
from manim_ml.neural_network.neural_network import NeuralNetwork

I hope this project gets better and better.

@helblazer811
Copy link
Owner

Thanks so much for the catch! I'm glad you like the project. I think I just forgot to add the manim_ml/neural_network/init.py file which defined all of these import shortcuts in the most recent pypi package. It should be good now if you install again by running pip install --upgrade manim_ml. Let me know if this works, sorry about that.

@chaoshengt
Copy link
Author

chaoshengt commented Jan 31, 2023

Thanks so much for the catch! I'm glad you like the project. I think I just forgot to add the manim_ml/neural_network/init.py file which defined all of these import shortcuts in the most recent pypi package. It should be good now if you install again by running pip install --upgrade manim_ml. Let me know if this works, sorry about that.

Yes. It works!
It seems that all of them are correct:

Snipaste_2023-01-31_09-12-40

I think it is better to keep only one way to import the code:(Method-A or Method-B).
In my opinion, “Method-B” is better. from "neural_network" module, we can import other network architectures, such as AlexNet, RNN, GCN,or Transformer . from "layers" module, we can import varieties layers of the corresponding architecture.

Of course, the amount of the job is enormous !

Thank you again! :)

@helblazer811
Copy link
Owner

I'm glad you appreciate the project. I am planning on adding some additional neural network architectures soon.

I understand it's a bit confusing. The main reason for method-a was to make the imports less complicated for example, so they don't have 5 or 6 lines of imports.

@helblazer811
Copy link
Owner

Closing now if this issue is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants