Open DiogenesAnalytics opened 11 months ago
Might make sense to refactor code to use a MetaLayer
class to store layer type/params:
from dataclasses import dataclass
from collections.abc import Sequence
from typing import Any
from typing import Dict
from keras.layers import Layer
from typing_extensions import override
@dataclass
class MetaLayer(Sequence):
layer: Layer
params: Dict[str, Any]
class Encode(MetaLayer):
pass
class Decode(MetaLayer):
pass
Problem
Currently there are no "sub-models" being created for the
encoder
anddecoder
. This is due to the complexity involved in determining which layers to use asinput
/output
for each model. Regardless of the eventual implementation strategy chosen, theBaseAutoencoder
class should have bothencode()
anddecode()
methods.References