Add day only option for calendar embedding#66
Open
smartin98 wants to merge 6 commits intoNVlabs:mainfrom
Open
Conversation
nbren12
reviewed
Nov 24, 2025
| return torch.concat([a, b], dim=1) # (n c x) | ||
|
|
||
| class CalendarEmbeddingOnlyDay(torch.nn.Module): | ||
| """Time embedding assuming 365.25 day years. Only uses day_of_year for use cases with daily resolution, second_of_day arg preserved for compatibility. |
Collaborator
There was a problem hiding this comment.
line is too long. Is the linter passing?
Author
There was a problem hiding this comment.
shortened and fixed the linter errors
Collaborator
|
Needs test coverage:
|
Author
added tests |
Collaborator
|
@smartin98 These tests are failing |
Signed-off-by: smartin98 <74623635+smartin98@users.noreply.github.com>
6839320 to
07d0e22
Compare
Author
|
@nbren12 sorry for the delay on this, I fixed the test and rebased to main. |
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.
@nbren12
This just allows for the use case where the data has only daily resolution and second_of_day embedding in the calendar embedding becomes redundant.
embeddings.py:
CalendarEmbeddingOnlyDay is the same as CalendarEmbedding except for returning only the day_of_year channels in the embedding. Still takes second_of_day argument for compatibility but this is not used.
networks.py:
Added flag in SongUNet to enable the OnlyDay embedding, defaults to False.