Weight Mapping Builders API¶
Auto-generated from source — see Weight Porting for how to write a new one.
Mapping builders¶
keras_climate.weights.mappings.afno_mapping.build_afno_mapper ¶
build_afno_mapper(depth, keras_prefix='')
Source code in keras_climate/weights/mappings/afno_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
keras_climate.weights.mappings.anysat_mapping.build_anysat_mapper ¶
build_anysat_mapper(modalities, keras_prefix='anysat_encoder')
Source code in keras_climate/weights/mappings/anysat_mapping.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
keras_climate.weights.mappings.anysat_release_mapping.build_anysat_release_mapper ¶
build_anysat_release_mapper(modalities, depth, keras_prefix='anysat_release')
Source code in keras_climate/weights/mappings/anysat_release_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
keras_climate.weights.mappings.autoformer_mapping.build_autoformer_mapper ¶
build_autoformer_mapper(encoder_layers, decoder_layers)
Source code in keras_climate/weights/mappings/autoformer_mapping.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
keras_climate.weights.mappings.clay_mapping.build_clay_identity_mapper ¶
build_clay_identity_mapper()
Source code in keras_climate/weights/mappings/clay_mapping.py
64 65 | |
keras_climate.weights.mappings.clay_mapping.convert_clay_encoder_state_dict ¶
convert_clay_encoder_state_dict(flat_state_dict, depth=12, num_latent_tokens=128)
Source code in keras_climate/weights/mappings/clay_mapping.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
keras_climate.weights.mappings.climax_mapping.build_climax_mapper ¶
build_climax_mapper(num_vars, depth, decoder_depth)
Source code in keras_climate/weights/mappings/climax_mapping.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
keras_climate.weights.mappings.convlstm_mapping.build_convlstm_identity_mapper ¶
build_convlstm_identity_mapper()
Source code in keras_climate/weights/mappings/convlstm_mapping.py
31 32 | |
keras_climate.weights.mappings.convlstm_mapping.convert_convlstm_stack_state_dict ¶
convert_convlstm_stack_state_dict(flat_state_dict, layer_specs, keras_prefix='encoder_convlstm')
Source code in keras_climate/weights/mappings/convlstm_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
keras_climate.weights.mappings.croma_mapping.build_croma_identity_mapper ¶
build_croma_identity_mapper()
Source code in keras_climate/weights/mappings/croma_mapping.py
107 108 | |
keras_climate.weights.mappings.croma_mapping.convert_croma_state_dict ¶
convert_croma_state_dict(flat_state_dict, encoder_depth=12)
Source code in keras_climate/weights/mappings/croma_mapping.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
keras_climate.weights.mappings.croma_mapping.load_croma_checkpoint ¶
load_croma_checkpoint(path)
Source code in keras_climate/weights/mappings/croma_mapping.py
6 7 8 9 10 11 12 13 14 15 16 17 18 | |
keras_climate.weights.mappings.deeplabv3plus_mapping.build_deeplabv3plus_mapper ¶
build_deeplabv3plus_mapper(backbone_keras_prefix='backbone', layer_counts=(3, 4, 6, 3))
Source code in keras_climate/weights/mappings/deeplabv3plus_mapping.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
keras_climate.weights.mappings.deeplabv3plus_mapping.build_resnet_backbone_mapper ¶
build_resnet_backbone_mapper(keras_prefix='backbone', layer_counts=(3, 4, 6, 3))
Source code in keras_climate/weights/mappings/deeplabv3plus_mapping.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
keras_climate.weights.mappings.dlinear_mapping.build_dlinear_mapper ¶
build_dlinear_mapper(num_channels=7, individual=False)
Source code in keras_climate/weights/mappings/dlinear_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
keras_climate.weights.mappings.earthformer_mapping.build_earthformer_mapper ¶
build_earthformer_mapper(num_enc_stages, num_dec_stages, enc_depths=None, dec_depths=None)
Source code in keras_climate/weights/mappings/earthformer_mapping.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
keras_climate.weights.mappings.fourcastnet_mapping.build_fourcastnet_mapper ¶
build_fourcastnet_mapper(depth)
Source code in keras_climate/weights/mappings/fourcastnet_mapping.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
keras_climate.weights.mappings.fourcastnet_mapping.convert_fourcastnet_state_dict ¶
convert_fourcastnet_state_dict(flat_state_dict, grid_h, grid_w)
Source code in keras_climate/weights/mappings/fourcastnet_mapping.py
13 14 15 16 17 18 19 20 | |
keras_climate.weights.mappings.fourcastnet_mapping.load_fourcastnet_checkpoint ¶
load_fourcastnet_checkpoint(path)
Source code in keras_climate/weights/mappings/fourcastnet_mapping.py
6 7 8 9 10 | |
keras_climate.weights.mappings.informer_mapping.build_informer_mapper ¶
build_informer_mapper(encoder_layers, decoder_layers)
Source code in keras_climate/weights/mappings/informer_mapping.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
keras_climate.weights.mappings.metnet_mapping.build_metnet_mapper ¶
build_metnet_mapper()
Source code in keras_climate/weights/mappings/metnet_mapping.py
79 80 | |
keras_climate.weights.mappings.metnet_mapping.convert_metnet_state_dict ¶
convert_metnet_state_dict(flat_state_dict, base_filters, num_dilated_convs=6, num_att_layers=4, num_upsample=2)
Source code in keras_climate/weights/mappings/metnet_mapping.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
keras_climate.weights.mappings.nbeats_mapping.build_nbeats_mapper ¶
build_nbeats_mapper(num_blocks, num_fc_layers=4)
Source code in keras_climate/weights/mappings/nbeats_mapping.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
keras_climate.weights.mappings.pangu_weather_mapping.build_pangu_weather_mapper ¶
build_pangu_weather_mapper(depths=(2, 6, 6, 2))
Source code in keras_climate/weights/mappings/pangu_weather_mapping.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
keras_climate.weights.mappings.pangu_weather_mapping.convert_pangu_weather_state_dict ¶
convert_pangu_weather_state_dict(flat_state_dict)
Source code in keras_climate/weights/mappings/pangu_weather_mapping.py
4 5 6 7 8 9 10 11 12 13 14 | |
keras_climate.weights.mappings.patchtst_mapping.build_patchtst_mapper ¶
build_patchtst_mapper(depth, use_revin=True)
Source code in keras_climate/weights/mappings/patchtst_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
keras_climate.weights.mappings.ringmo_mapping.build_ringmo_decoder_mapper ¶
build_ringmo_decoder_mapper(keras_prefix='ringmo_decoder')
Source code in keras_climate/weights/mappings/ringmo_mapping.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
keras_climate.weights.mappings.ringmo_mapping.build_ringmo_encoder_mapper ¶
build_ringmo_encoder_mapper(depths, keras_prefix='ringmo_encoder')
Source code in keras_climate/weights/mappings/ringmo_mapping.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
keras_climate.weights.mappings.ringmo_mapping.build_ringmo_mapper ¶
build_ringmo_mapper(depths, encoder_prefix='ringmo_encoder', decoder_prefix='ringmo_decoder')
Source code in keras_climate/weights/mappings/ringmo_mapping.py
102 103 104 105 106 107 108 109 110 111 112 113 114 | |
keras_climate.weights.mappings.satclip_mapping.SATCLIP_SKIP_PATTERNS
module-attribute
¶
SATCLIP_SKIP_PATTERNS = ['^model\\.visual\\.', '^model\\.logit_scale$', '^model\\.posenc', '^model\\.location\\.posenc', '^model\\.nnet\\.']
keras_climate.weights.mappings.satclip_mapping.build_satclip_location_mapper ¶
build_satclip_location_mapper(num_hidden_layers=2)
Source code in keras_climate/weights/mappings/satclip_mapping.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
keras_climate.weights.mappings.satclip_mapping.load_satclip_checkpoint ¶
load_satclip_checkpoint(path)
Source code in keras_climate/weights/mappings/satclip_mapping.py
4 5 6 7 8 | |
keras_climate.weights.mappings.satmae_mapping.build_satmae_decoder_mapper ¶
build_satmae_decoder_mapper(keras_prefix='satmae_decoder', torch_prefix='')
Source code in keras_climate/weights/mappings/satmae_mapping.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
keras_climate.weights.mappings.satmae_mapping.build_satmae_encoder_mapper ¶
build_satmae_encoder_mapper(keras_prefix='satmae_encoder', mode='single')
Source code in keras_climate/weights/mappings/satmae_mapping.py
11 12 13 14 15 | |
keras_climate.weights.mappings.satmae_mapping.build_satmae_mapper ¶
build_satmae_mapper(encoder_prefix='satmae_encoder', decoder_prefix='satmae_decoder', mode='single')
Source code in keras_climate/weights/mappings/satmae_mapping.py
64 65 66 67 68 69 70 71 72 73 74 75 76 | |
keras_climate.weights.mappings.scalemae_mapping.SCALEMAE_SKIP_PATTERNS
module-attribute
¶
SCALEMAE_SKIP_PATTERNS = ['^pos_embed$', '^decoder_pos_embed$']
keras_climate.weights.mappings.scalemae_mapping.build_scalemae_mapper ¶
build_scalemae_mapper(keras_prefix='scalemae_encoder')
Source code in keras_climate/weights/mappings/scalemae_mapping.py
4 5 | |
keras_climate.weights.mappings.segformer_mapping.build_segformer_mapper ¶
build_segformer_mapper(cfg, keras_name='segformer', decode_head_prefix='decode_head')
Source code in keras_climate/weights/mappings/segformer_mapping.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
keras_climate.weights.mappings.segformer_mapping.build_segformer_param_kind_map ¶
build_segformer_param_kind_map(cfg, keras_name='segformer')
Source code in keras_climate/weights/mappings/segformer_mapping.py
197 198 199 200 201 202 203 204 205 | |
keras_climate.weights.mappings.segformer_mapping.convert_hf_segformer_state_dict ¶
convert_hf_segformer_state_dict(hf_state_dict, cfg)
Source code in keras_climate/weights/mappings/segformer_mapping.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
keras_climate.weights.mappings.ssl4eo_mapping.build_ssl4eo_mapper ¶
build_ssl4eo_mapper(keras_prefix='backbone', layer_counts=(3, 4, 6, 3))
Source code in keras_climate/weights/mappings/ssl4eo_mapping.py
8 9 10 11 12 13 14 15 16 17 18 | |
keras_climate.weights.mappings.tft_mapping.build_tft_mapper ¶
build_tft_mapper(num_past_vars, num_future_vars, hidden_dim)
Source code in keras_climate/weights/mappings/tft_mapping.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
keras_climate.weights.mappings.tft_mapping.convert_tft_lstm_state_dict ¶
convert_tft_lstm_state_dict(flat_state_dict, torch_prefix, keras_prefix)
Source code in keras_climate/weights/mappings/tft_mapping.py
124 125 126 127 128 129 130 131 132 133 134 135 136 | |
keras_climate.weights.mappings.timesnet_mapping.build_timesnet_mapper ¶
build_timesnet_mapper(num_layers, num_kernels, use_revin=True)
Source code in keras_climate/weights/mappings/timesnet_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
keras_climate.weights.mappings.unet_mapping.build_mapper ¶
build_mapper(depth=4)
Source code in keras_climate/weights/mappings/unet_mapping.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
keras_climate.weights.mappings.vit_mapping.build_vit_mapper ¶
build_vit_mapper(keras_prefix, block_name_fn=None, extra_rules=None)
Source code in keras_climate/weights/mappings/vit_mapping.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |