Module pysimt.layers.decoders

GRU and Transformer-based sequential decoders.

Expand source code
"""GRU and Transformer-based sequential decoders."""

from .conditional import ConditionalGRUDecoder
from .tf_decoder import TFDecoder


def get_decoder(type_):
    """Only expose ones with compatible __init__() arguments for now."""
    return {
        'cond': ConditionalGRUDecoder,
        'tf': TFDecoder,
    }[type_]

Sub-modules

pysimt.layers.decoders.conditional
pysimt.layers.decoders.tf_decoder

Functions

def get_decoder(type_)

Only expose ones with compatible init() arguments for now.

Expand source code
def get_decoder(type_):
    """Only expose ones with compatible __init__() arguments for now."""
    return {
        'cond': ConditionalGRUDecoder,
        'tf': TFDecoder,
    }[type_]