bitorch.layers.extensions.layer_container.LayerContainer¶
- class bitorch.layers.extensions.layer_container.LayerContainer(impl_class: Type[T], *args: Any, **kwargs: Any)[source]¶
This class wraps another layer - but the internally contained class can be swapped out during runtime.
Methods
Wrap a new object based on the given class, positional arguments, and keyword arguments.
Replace the internally stored layer object with the given one.
Attributes
internal_variable_names
Access the internally wrapped layer object directly.
patch
recipe
- __init__(impl_class: Type[T], *args: Any, **kwargs: Any) None [source]¶
Wrap a new object based on the given class, positional arguments, and keyword arguments. :param impl_class: class of the new object :param *args: positional arguments of the new object :param **kwargs: keyword arguments of the new object
- property layer_implementation: T¶
Access the internally wrapped layer object directly. :returns: the internal layer object