Make spatiotemporal autoencoders reconstruct sequences - #154
Open
sergioald wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the two spatiotemporal autoencoders to reconstruct complete
input sequences.
The public mappings become:
There is no
reconstruction_modeoption. Both classes now have one clearautoencoder objective: reconstruct the complete sample supplied to the
encoder.
Rationale
The previous implementation encoded a complete sequence but reconstructed
only its final input frame. That sequence-to-frame behaviour was useful, but
it was surprising for classes named autoencoders and prevented a direct
full-window comparison with PCA and the existing
LSTMAutoencoder.A new user would normally expect:
This PR makes that expectation true for all reconstruction-oriented sequence
models.
Architecture
ConvLSTM autoencoder
k.Hybrid ConvLSTM-Transformer autoencoder
k.API behaviour
The same behaviour applies to
HybridConvLSTMTransformerAutoencoder.fit(X)and the reconstruction metric helpers use the complete sequenceXas their default target. A custom
ymust have the same shape asX.Breaking change
This intentionally changes the output shape of both spatiotemporal classes:
Existing final-frame checkpoints are not compatible with the new decoder
architecture. They should remain tied to the earlier BlueMath_tk version that
created them. Loading them into the new classes is expected to fail rather
than silently initialise missing sequence-decoder parameters.
The removed final-frame operation is better represented in future by a
separately named sequence-to-frame model, not by an autoencoder mode.
Tests
The PR adds or updates coverage for:
predict(X) == decode(encode(X));reconstruction_modeargument;Local validation
Replace these placeholders with the results from the complete checkout: