Source code for parametricmatrixmodels.modules.flatten
from __future__ import annotations
from .reshape import Reshape
[docs]
class Flatten(Reshape):
"""
Module that flattens the input to 1D. Ignores the batch dimension.
"""
[docs]
def __init__(self) -> None:
super().__init__(shape=(-1,))
[docs]
def name(self) -> str:
return "Flatten"