Skip to content

Instantly share code, notes, and snippets.

@himanshurawlani
Last active June 10, 2022 19:14
Show Gist options
  • Save himanshurawlani/225b1d0c9678189b3c57c99f75a7e5e5 to your computer and use it in GitHub Desktop.
Save himanshurawlani/225b1d0c9678189b3c57c99f75a7e5e5 to your computer and use it in GitHub Desktop.
import tensorflow as tf
def FCN_model(len_classes=5, dropout_rate=0.2):
# Input layer
input = tf.keras.layers.Input(shape=(None, None, 3))
# A convolution block
x = tf.keras.layers.Conv2D(filters=32, kernel_size=3, strides=1)(input)
x = tf.keras.layers.Dropout(dropout_rate)(x)
x = tf.keras.layers.BatchNormalization()(x)
x = tf.keras.layers.Activation('relu')(x)
# Stack of convolution blocks
.
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment