mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-25 02:32:59 +00:00
convnext_inverse: add returns; change ordering
This commit is contained in:
parent
fe813cb46d
commit
6a0790ff50
1 changed files with 5 additions and 1 deletions
|
@ -30,11 +30,15 @@ def convnext_inverse(layer_in, depths, dims):
|
||||||
layer_next = block_upscale(layer_next, i, depth=depth, dim=dim)
|
layer_next = block_upscale(layer_next, i, depth=depth, dim=dim)
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
return layer_next
|
||||||
|
|
||||||
|
|
||||||
def block_upscale(layer_in, block_number, depth, dim):
|
def block_upscale(layer_in, block_number, depth, dim):
|
||||||
layer_next = layer_in
|
layer_next = layer_in
|
||||||
for i in range(depth):
|
for i in range(depth):
|
||||||
layer_next = add_convnext_block(layer_next, dim=dim, prefix=f"cns.stage{block_number}.block.{i}")
|
layer_next = add_convnext_block(layer_next, dim=dim, prefix=f"cns.stage{block_number}.block.{i}")
|
||||||
|
|
||||||
layer_next = tf.keras.layers.LayerNormalization(name=f"cns.stage{block_number}.end.norm", epsilon=1e-6)(layer_next)
|
|
||||||
layer_next = tf.keras.layers.Conv2DTranspose(name=f"cns.stage{block_number}.end.convtp", filters=dim, kernel_size=4, padding="same")(layer_next)
|
layer_next = tf.keras.layers.Conv2DTranspose(name=f"cns.stage{block_number}.end.convtp", filters=dim, kernel_size=4, padding="same")(layer_next)
|
||||||
|
layer_next = tf.keras.layers.LayerNormalization(name=f"cns.stage{block_number}.end.norm", epsilon=1e-6)(layer_next)
|
||||||
|
|
||||||
|
return layer_next
|
||||||
|
|
Loading…
Reference in a new issue