This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor SatFlow for new models in separate repos (#86)
* Add learnable query Needs more testing, currently does not work Also made slight change as PerceiverIO implementation changed as well in upstream repo * Update Perceiver IO with newer options Add in the decoder feedforward for the multi-pass version Continue working on the SinglePassPerceiver, output shape is wrong still, there is a 2 somewhere that I'm missing * Add decoder_ff as config option * Add total variation loss and Dynamic SSIM loss From https://arxiv.org/pdf/2004.05214.pdf mentioning that SSIM tends to regress to predicting the background, and MSE predicting blurry images, total variation loss is one way to combat that, and another is to only use SSIM on the parts of the image that changes * Add TODO * Add losses to get_loss * Add to assert * Add Gradient Difference Loss, relates to #5 * Remove MetNet and Nowcasting GAN files They are now in their own repos and importable with pip * Remove unused imports * Update to remove shadowing * Fix test * Skip two tests because of changes with Perceiver model * Update test * Remove some of MetNet code and Perceiver Encoders MetNet code is in the new metnet repo, same with the perceiver code in the perceiver-pytorch repo * Update to use OCF perceiver pytorch * Add encoder/decoders * Simplify MultiPerceiverSat using OCF perceiver * Update MultiPerceiverSat to use new perceiver * Only test on 3.8+ * Remove SinglePassPerceiver It can be accomplished with the perceiverio implementation fairly easily now, so once that's merged there can use it. * Remove MetNetPreprocessor Taken care of in the model repos * Switch to pip install * Switch pip name
- Loading branch information
1 parent
93cbfcf
commit bb1b5c6
Showing
28 changed files
with
299 additions
and
2,796 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
_target_: satflow.models.perceiver.SinglePassPerceiver | ||
input_channels: 16 | ||
sat_channels: 12 | ||
forecast_steps: 3 | ||
lr: 0.005 | ||
input_size: 32 | ||
max_frequency: 16.0 | ||
depth: 6 | ||
num_latents: 256 | ||
cross_heads: 1 | ||
latent_heads: 8 | ||
cross_dim_heads: 8 | ||
latent_dim: 256 | ||
weight_tie_layers: False | ||
self_per_cross_attention: 2 | ||
dim: 32 | ||
logits_dim: null | ||
queries_dim: 128 | ||
latent_dim_heads: 64 | ||
visualize: False | ||
preprocessor_type: "metnet" | ||
use_input_as_query: True | ||
use_learnable_query: False | ||
output_shape: [3, 32, 32] |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
from .base import get_model, create_model | ||
from .conv_lstm import EncoderDecoderConvLSTM, ConvLSTM | ||
from .metnet import MetNet | ||
from .pix2pix import Pix2Pix | ||
from .pl_metnet import LitMetNet | ||
|
||
from .runet import R2U_Net, RUnet | ||
from .attention_unet import R2AttU_Net, AttU_Net | ||
from .cloudgan import CloudGAN | ||
from .nowcasting_gan import NowcastingGAN | ||
|
||
from .perceiver import Perceiver |
Oops, something went wrong.