V2 Encoder Architecture#92
Draft
jakehlee wants to merge 4 commits into
Draft
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.
This is a draft PR for an updated SpecTfEncoder architecture. I am calling it V2 to avoid breaking backwards compatibility.
banddef, or the wavelength grid of the spectra used for the learned positional embedding, was previously a static parameter of the model architecture. This is because we expected this value to not change at the instrument level (e.g. for EMIT). However, we now know this is a parameter that does change over time, especially for other instruments. In the V2 architecture, thebanddefis now an input feature, not a model parameter. This means that a differentbanddefcan be passed per-spectrum, or a singlebanddefcan be passed for the entire batch.maskargument is added to support variable-length input sequences in the future. This would allow spectra with entirely different spectral grids (e.g. AVIRIS and EMIT) to be fed within the same batch for specific inter-instrument training.Topics for discussion/comment:
SpecTfEncoderimplementation and port over the old model weights to the new architecture. This is a bigger lift but it's technically possible with some work.I am currently using this implementation on a research task, if that task goes smoothly and we resolve the point above we can open the PR to be merged.