Module fast_transformers.events
This module implements a basic event system that allows the transformer internal components to make available any tensor with minimal overhead.
Expand source code
#
# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/
# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>
#
"""This module implements a basic event system that allows the transformer
internal components to make available any tensor with minimal overhead."""
from .event import Event, AttentionEvent, QKVEvent
from .event_dispatcher import EventDispatcher
Sub-modules
fast_transformers.events.event
fast_transformers.events.event_dispatcher
fast_transformers.events.filters
-
Define composable functions to filter events.