def __init__(self): super(ReductionB, self).__init__() self.b1_maxpool = tf.keras.layers.MaxPool2D(pool_size=(3, 3), strides=2, padding="valid") self.b2_conv1 = BasicConv2D(filters=256, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv2 = BasicConv2D(filters=384, kernel_size=(3, 3), strides=2, padding="valid") self.b3_conv1 = BasicConv2D(filters=256, kernel_size=(1, 1), strides=1, padding="same") self.b3_conv2 = BasicConv2D(filters=288, kernel_size=(3, 3), strides=2, padding="valid") self.b4_conv1 = BasicConv2D(filters=256, kernel_size=(1, 1), strides=1, padding="same") self.b4_conv2 = BasicConv2D(filters=288, kernel_size=(3, 3), strides=1, padding="same") self.b4_conv3 = BasicConv2D(filters=320, kernel_size=(3, 3), strides=2, padding="valid")
def __init__(self): super(InceptionResNetA, self).__init__() self.b1_conv = BasicConv2D(filters=32, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv1 = BasicConv2D(filters=32, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv2 = BasicConv2D(filters=32, kernel_size=(3, 3), strides=1, padding="same") self.b3_conv1 = BasicConv2D(filters=32, kernel_size=(1, 1), strides=1, padding="same") self.b3_conv2 = BasicConv2D(filters=48, kernel_size=(3, 3), strides=1, padding="same") self.b3_conv3 = BasicConv2D(filters=64, kernel_size=(3, 3), strides=1, padding="same") self.conv = Conv2DLinear(filters=384, kernel_size=(1, 1), strides=1, padding="same")
def __init__(self): super(Stem, self).__init__() self.conv1 = BasicConv2D(filters=32, kernel_size=(3, 3), strides=2, padding="valid") self.conv2 = BasicConv2D(filters=32, kernel_size=(3, 3), strides=1, padding="valid") self.conv3 = BasicConv2D(filters=64, kernel_size=(3, 3), strides=1, padding="same") self.maxpool = tf.keras.layers.MaxPool2D(pool_size=(3, 3), strides=2, padding="valid") self.conv4 = BasicConv2D(filters=80, kernel_size=(1, 1), strides=1, padding="same") self.conv5 = BasicConv2D(filters=192, kernel_size=(3, 3), strides=1, padding="valid") self.conv6 = BasicConv2D(filters=256, kernel_size=(3, 3), strides=2, padding="valid")
def __init__(self): super(InceptionResNetC, self).__init__() self.b1_conv = BasicConv2D(filters=192, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv1 = BasicConv2D(filters=192, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv2 = BasicConv2D(filters=224, kernel_size=(1, 3), strides=1, padding="same") self.b2_conv3 = BasicConv2D(filters=256, kernel_size=(3, 1), strides=1, padding="same") self.conv = Conv2DLinear(filters=2144, kernel_size=(1, 1), strides=1, padding="same")
def __init__(self): super(InceptionResNetB, self).__init__() self.b1_conv = BasicConv2D(filters=192, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv1 = BasicConv2D(filters=128, kernel_size=(1, 1), strides=1, padding="same") self.b2_conv2 = BasicConv2D(filters=160, kernel_size=(1, 7), strides=1, padding="same") self.b2_conv3 = BasicConv2D(filters=192, kernel_size=(7, 1), strides=1, padding="same") self.conv = Conv2DLinear(filters=1152, kernel_size=(1, 1), strides=1, padding="same")