Add todo and comment

This commit is contained in:
Starbeamrainbowlabs 2022-10-03 19:06:56 +01:00
parent 2b182214ea
commit 0ee6703c1e
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 2 additions and 0 deletions

View file

@ -36,6 +36,7 @@ def convnext_inverse(layer_in, depths, dims):
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
# Ref https://machinelearningmastery.com/upsampling-and-transpose-convolution-layers-for-generative-adversarial-networks/ to understand Conv2DTranspose
layer_next = tf.keras.layers.Conv2DTranspose( layer_next = tf.keras.layers.Conv2DTranspose(
name=f"cns.stage{block_number}.end.convtp", name=f"cns.stage{block_number}.end.convtp",
filters=dim, filters=dim,

View file

@ -29,6 +29,7 @@ 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 perhaps? # TODO: An attention layer here instead of a dense layer, with a skip connection perhaps?
raise Exception("Error: read and implement attention from https://ieeexplore.ieee.org/document/9076883")
layer_next = tf.keras.layers.Dense(32)(layer_next) layer_next = tf.keras.layers.Dense(32)(layer_next)
layer_next = tf.keras.layers.Conv2D(1, kernel_size=1, activation="softmax", padding="same")(layer_next) layer_next = tf.keras.layers.Conv2D(1, kernel_size=1, activation="softmax", padding="same")(layer_next)