mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-25 18:33:01 +00:00
ai: tweak the segmentation model structure
This commit is contained in:
parent
1bc8a5bf13
commit
e3c8277255
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,8 @@ import tensorflow as tf
|
||||||
from .components.convnext_inverse import do_convnext_inverse
|
from .components.convnext_inverse import do_convnext_inverse
|
||||||
|
|
||||||
def model_rainfallwater_segmentation(metadata, feature_dim_in, shape_water_out, batch_size=64, summary_file=None):
|
def model_rainfallwater_segmentation(metadata, feature_dim_in, shape_water_out, batch_size=64, summary_file=None):
|
||||||
|
out_water_width, out_water_height, out_water_channels = shape_water_out
|
||||||
|
|
||||||
|
|
||||||
layer_input = tf.keras.layers.Input(
|
layer_input = tf.keras.layers.Input(
|
||||||
shape=(feature_dim_in)
|
shape=(feature_dim_in)
|
||||||
|
@ -18,6 +20,10 @@ def model_rainfallwater_segmentation(metadata, feature_dim_in, shape_water_out,
|
||||||
|
|
||||||
layer_next = do_convnext_inverse(layer_next, arch_name="convnext_i_tiny")
|
layer_next = do_convnext_inverse(layer_next, arch_name="convnext_i_tiny")
|
||||||
|
|
||||||
|
# TODO: An attention layer here instead of a dense layer, with a skip connection?
|
||||||
|
layer_next = tf.keras.layers.Dense(32)(layer_next)
|
||||||
|
layer_next = tf.keras.layers.Conv2D(out_water_channels, 7, activation="softmax", padding="same")(layer_next)
|
||||||
|
|
||||||
# TODO: Implement projection head here
|
# TODO: Implement projection head here
|
||||||
|
|
||||||
model = tf.keras.Model(
|
model = tf.keras.Model(
|
||||||
|
|
Loading…
Reference in a new issue