Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional moment calculation #126

Merged
merged 118 commits into from
Dec 16, 2022
Merged

Conditional moment calculation #126

merged 118 commits into from
Dec 16, 2022

Conversation

malihass
Copy link
Collaborator

@malihass malihass commented Dec 12, 2022

  • Creating the model Sup3rCondMom and WindCondMom which do not include the discriminator details
  • Batch handler provides output and mask on top oflow_res high_res. This is useful because sometime the high_res may not be directly obtainable from the output we are learning. The mask is useful if padding needs to be used.
  • Different batch handler subclasses are implemented to learn conditional moments in different ways
    • SF: learns the conditional moment of the sub filter velocity SF=(HR-LR)
    • Mom1: learns first conditional moment (HR|LR) or (SF|LR)
    • Mom2: learns second conditional moment ((HR - (HR|LR))^2 | LR) or ((SF - (SF|LR))^2 | LR)
    • Mom2Sep: Learn second moment independently of the first moment (HR^2|LR) or (SF^2|LR)

Copy link
Member

@grantbuster grantbuster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malihass, everything looks good on my end. Shame about the _tf_generate() vs. _tf_generate_wind() methods, i'm assuming you did this because of the multi-class inheritance conflict? Good solution but still a shame it couldnt be cleaner haha.

I'm approving but I still want @bnb32 to get a chance to look at the updates to the batch handling before you merge.

@bnb32
Copy link
Collaborator

bnb32 commented Dec 15, 2022

@malihass, everything looks good on my end. Shame about the _tf_generate() vs. _tf_generate_wind() methods, i'm assuming you did this because of the multi-class inheritance conflict? Good solution but still a shame it couldnt be cleaner haha.

I'm approving but I still want @bnb32 to get a chance to look at the updates to the batch handling before you merge.

Is there really not a way to override that method with multi class inheritance?

Copy link
Collaborator

@bnb32 bnb32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thanks! I just have some questions about the inheritance stuff and whether we can avoid the _wind suffix work around.

Copy link
Collaborator

@bnb32 bnb32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_wind seems like the best solution since WindGan also inherits this stuff. Good work!

@malihass malihass merged commit d9f44b0 into main Dec 16, 2022
@malihass malihass deleted the conditionalMoment_pr branch December 16, 2022 06:39
github-actions bot pushed a commit that referenced this pull request Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants