All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
This project adheres to Semantic Versioning, with the exception that v0.X updates include backwards-incompatible API changes. From v1.0.0 and on, the project will adherence strictly to Semantic Versioning.
- Ensure state_index remains on the same device after clean_state.
- Option to use strings to specify transformer activation.
### Added
- Onnx as dev requirement.
- Allow torch>=2.0.
### Added
Skip
module.- "leading" mode in
Residual
.
### Added
- Description of state handling to README.
- Documentation formatting for
co.Identity()
examples. - Horovod check for newer pytorch lightning versions.
### Added
query_index
argument toSingleOutputTransformerEncoderLayer
.
Residual
centred residual andDelay
auto_delay forward_step.
### Added
- Support for
GroupNorm
andInstanceNorm
### Added
append
function toco.Sequential
.- Production-ready docstrings for public functions.
- reduce_max to
Reduce
.
### Changed
- Rename
Unity
toIdentity
to followtorch.nn
. - Major overhaul of README, improving descriptions and adding benchmark.
- Major overhaul of docs, improving descriptions and adding benchmark.
- MHA warnings to only log once.
- Unused parameters
batch_first
andbidirectional
for RNN, GRU, and LSTM.
co.Conditional
onnx support for single-option config.
co.Conditional
onnx support.
co.Conv
onnx export for kernel_size=1.
- Ability to access onnx from root, i.e.
co.onnx
.
- ONNX compatibility to all library modules!
co.onnx.export
function mirroringtorch.onnx.export
.- purely functional
_forward_step
function to all modules. _state_shape
and_dynamic_state_inds
properties to modules.- Add about info to package root.
- Change call_mode internally from enum to tensor.
- Change internal state_indexes to tensors.
- Change stride to tuple.
- Change padding to tuple.
### Fixed
- Fix assertion bug in co.Lambda.
### Removed
- TensorPlaceholder in favour of
None
.
- Missing part on Continual Transformers in README.
- Conv cpp impl.
- Citations for Continual Inference lib paper.
- Docs.
- Automatic conversion for RNN modules.
- Continual Transformer modules, including:
RecyclingPositionalEncoding
RetroactiveMultiheadAttention
SingleOutputMultiheadAttention
SingleOutputTransformerEncoderLayer
RetroactiveTransformerEncoderLayer
TransformerEncoderLayerFactory
TransformerEncoder
### Added
- "lagging" option for shrink in
co.Delay
andco.Residual
. co.RNN
.co.LSTM
.co.GRU
.
phantom_padding
renamed toresidual_shrink
.
- Missing cpp file in package.
- CoConv step impl in C++.
- FLOPs module registration compatibility with ptflops >=v0.6.8.
- Call-mode specific functions in
co.Lambda
- Support for functor in
co.Lambda
nn.LayerNorm
from automatically convertible modules
nn.LayerNorm
to automatically convertible modules
ParallelDispatch
module.Conditional
predicate print in__repr__
.
- Sequential
padding
computation. Lambda
__repr__
function prints.
- CI testing for python v3.6.
- Added
phantom_padding
toResidual
. - Added
receptive_field
property. - Added
Reshape
module.
- Rename
forward_shrink
argument toauto_shrink
inDelay
. - Torch requirement to v1.9.
- Replace
Lambda
unsqueeze_step with takes_time and new default to False.
padding
property in sequence.delay
property in sequence.strict
mode inload_state_dict
.
- Assertion error in
BroadcastReduce
for modules with different delays.
- Add
forward_shrink
option toDelay
andResidual
.
- Add
Constant
. - Add
Zero
. - Add
One
.
co.ConvXd
cuda compatibility.
- Add
flatten_state_dict
state variable.
- Debug message for Convolutions with padding.
call_mode
forLinear
.
- Add
call_mode
. - Add
warm_up
.
- Container implementations to use
__call__
with alternating call_modes. This change was necessary to properly trigger the torch hooks needed inptflops
.
ptflops
compatibility.
co.Linear
module.- Improved repr in
co.Lambda
. - Option to skip unsqueeze in
co.Lambda.forward_step
.
- Renamed
co.Parallel
toco.BroadcastReduce
.
co.Broadcast
module.- new
co.Parallel
module. co.Reduce
module.- Automatic inference of
co.Broadcast.num_streams
inco.Sequential
.
co.Lambda
module.co.Add
module.co.Multiply
module.co.Unity
module.co.Conditional
module.
- Bug in
forward_stepping
. - Bug in
clean_state
.
- Bugs in
forward_step(s)
withupdate_state=False
.
forward_steps
interface to always includepad_end
argument.- Name of "interface.py" to "module.py".
- Implementations of
forward_step(s)
to be consolidated in CoModule.
Padded
interface.
- Independent state_dict and load_state_dict functions.
- Added nonempty check for aggregation functions in Parallel.
update_state
argument to allforward_step(s)
methods.- Additional tests for edge-cases
- Changed default pad_end value to False.
- Continual interface and conversion to support both class and module.
- Replicate padding in
co._ConvNd
co.Residual
modules to be unnamed. This allows the module state dicts to be flattened.
- Flattened state dict export and loading via a
flatten
argument. This feature improves interoperability complex modules, that were not originally constructed with theco.Sequential
andco.Parallel
building blocks. - Context manager for triggering flattened state_dict export and loading.
- Support for zero-delay in
co.Delay
- Support for broadcasting in
co.Parallel
- Mul (hadamard product) aggregation in
co.Parallel
- Example of Squeeze and Excitation block
co._PoolNd
attribute naming: "temporal_*" removed as prefix for kernel_size, stride, dilation, and padding.
co.Delay
handling for padding.- Handling of initialization and strides in containers
co.Conv
build_from
behavior to not change dilation and stride. Argument overload supported instead.pad_start
andpad_end
args to convolution and pooling modulesforward_steps
.- Behavior of modules while they initialize. Now, a TensorPlaceholder is passed for initializing steps.
- Automatic unsqueeze in pooling.
- Support for dropout.
- Support for dilation and stride in pooling.
- Pooling API to match torch.nn better.
_ConvCoNd.forward_steps
doesn't invokeclean_state
anymore.
- Automatic conversion of batch normalization and activation functions.
- Separate dilation and stride in pool.
- Conv forward to use temporal padding like (like nn.Conv).
co.BatchNorm2d
- Renamed
unsqueezed
toforward_stepping
.
- Unused utility
Zeros
- Naming to match
torch.nn
. This lets the continual modules be used as drop-in replacements fortorch.nn
modules. - Renamed
forward_regular_unrolled
toforward
,forward_regular
toforward_steps
, andforward
forforward_step
. - Renamed
from_regular
tobuild_from
. - Renamed
continual
tounsqueezed
.
Sequential
wrapper for sequential application of modulesParallel
wrapper for parallel application and aggregation of inputsResidual
wrapper for adding a unity residual to a modulecontinual
conversion functionregister
function for 3rd party modules to register their conversion- Additional tests
- Pooling modules:
MaxPool1d
,AvgPool3d
,MaxPool3d
,AdaptiveAvgPool3d
,AdaptiveMaxPool3d
.
- Updated README.
- Initial publicly available implementation of the library.