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

NN scaling issue with Convolutional3DLayer #4

Open
fhnaumann opened this issue Oct 27, 2022 · 2 comments
Open

NN scaling issue with Convolutional3DLayer #4

fhnaumann opened this issue Oct 27, 2022 · 2 comments

Comments

@fhnaumann
Copy link

fhnaumann commented Oct 27, 2022

At some point there was code commited changing the behaviour of the net when scaling it.
If I use the code in the pip package everything works fine (0.0.11 seems to contain only code prior to the 7th of may).
https://user-images.githubusercontent.com/54776552/198372984-f704cceb-8582-4bf9-bc23-c15ebb836b34.mp4

However I'm forking the repo (with the latest commit from august) because I need to change some internal code and noticed this problem.

Test.mp4

Maybe someone can pinpoint the exact commit which causes this behaviour?

Code used:

class Test(Scene):
	def construct(self):
		# Make the Layer object
		l1 = Convolutional3DLayer(4, 2, 2)
		l2 = Convolutional3DLayer(5, 1, 1)
		l3 = Convolutional3DLayer(2, 3, 3)
		layers = [l1, l2, l3]
		nn = NeuralNetwork(layers)
		nn.scale(2)
		nn.move_to(ORIGIN)
		# Make Animation
		self.add(nn)
		#self.play(Create(nn))
		forward_propagation_animation = nn.make_forward_pass_animation(run_time=5, passing_flash=True)

		self.play(forward_propagation_animation)
@fhnaumann
Copy link
Author

Additional note:

The reason I'm forking the project is because I created custom layers which also have corresponding ConnectiveLayers, but in order to make them work they need to be added to the connective_layers_list in the init file.
Perhaps let get_connective_layer in util.py take in an optional list with additional classes? That way one can add layers without modifying the source code.

@helblazer811
Copy link
Owner

Hey, sorry I haven't had time to work on this project for a while. I spent some time revamping how the convolutional neural network visualization is done and I think it is much more faithful to the actual algorithm. I will also look into a better solution for allowing the library to be extended (new layers, new animations, etc.) without modifying the code. It is still under development but here is an example of the new CNN visualization.

CNN.Visualization.Twitter.mov

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