DiogenesAnalytics / autoencoder

Python library implementing various autoencoders.
https://colab.research.google.com/github/DiogenesAnalytics/autoencoder/blob/master/notebooks/demo/anomaly_detection.ipynb
MIT License
0 stars 0 forks source link

Feature: Implement Encode/Decode Methods #17

Open DiogenesAnalytics opened 11 months ago

DiogenesAnalytics commented 11 months ago

Problem

Currently there are no "sub-models" being created for the encoder and decoder. This is due to the complexity involved in determining which layers to use as input/output for each model. Regardless of the eventual implementation strategy chosen, the BaseAutoencoder class should have both encode() and decode() methods.

References

DiogenesAnalytics commented 11 months ago

Class: MetaLayer

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

References