mirror of
https://github.com/helblazer811/ManimML.git
synced 2025-08-06 00:48:56 +08:00
Added support for Neural Network overhead title and per-layer title.
This commit is contained in:
@ -6,11 +6,17 @@ class NeuralNetworkLayer(ABC, Group):
|
||||
|
||||
def __init__(self, text=None, **kwargs):
|
||||
super(Group, self).__init__()
|
||||
self.title_text = kwargs["title"] if "title" in kwargs else " "
|
||||
self.title = Text(self.title_text, font_size=DEFAULT_FONT_SIZE/3)
|
||||
|
||||
@abstractmethod
|
||||
def make_forward_pass_animation(self):
|
||||
pass
|
||||
|
||||
@override_animation(Create)
|
||||
def _create_override(self):
|
||||
pass
|
||||
|
||||
def __repr__(self):
|
||||
return f"{type(self).__name__}"
|
||||
|
||||
@ -23,6 +29,10 @@ class VGroupNeuralNetworkLayer(NeuralNetworkLayer):
|
||||
def make_forward_pass_animation(self):
|
||||
pass
|
||||
|
||||
@override_animation(Create)
|
||||
def _create_override(self):
|
||||
return super()._create_override()
|
||||
|
||||
class ConnectiveLayer(VGroupNeuralNetworkLayer):
|
||||
"""Forward pass animation for a given pair of layers"""
|
||||
|
||||
@ -40,4 +50,8 @@ class ConnectiveLayer(VGroupNeuralNetworkLayer):
|
||||
|
||||
@abstractmethod
|
||||
def make_forward_pass_animation(self):
|
||||
pass
|
||||
pass
|
||||
|
||||
@override_animation(Create)
|
||||
def _create_override(self):
|
||||
return super()._create_override()
|
Reference in New Issue
Block a user