смотри вот моя модель, можешь преобразовать ее в tf_light и сохранить локально
import tensorflow as tf


def conv1x1(in_planes, out_planes, stride=1):
    """1x1 convolution without padding."""
    return tf.keras.layers.Conv2D(
        filters=out_planes,
        kernel_size=1,
        strides=stride,
        padding='valid',
        use_bias=False)


def conv3x3(in_planes, out_planes, stride=1):
    """3x3 convolution with padding."""
    return tf.keras.layers.Conv2D(
        filters=out_planes,
        kernel_size=3,
        strides=stride,
        padding='same',
        use_bias=False)


class BasicBlock(tf.keras.layers.Layer):
    def __init__(self, in_planes, planes, stride=1):
        super(BasicBlock, self).__init__()
        self.conv1 = conv3x3(in_planes, planes, stride=stride)
        self.bn1 = tf.keras.layers.BatchNormalization()
        self.relu = tf.keras.layers.ReLU()
        self.conv2 = conv3x3(planes, planes)
        self.bn2 = tf.keras.layers.BatchNormalization()

        if stride != 1 or in_planes != planes:
            self.downsample = tf.keras.Sequential([
                conv1x1(in_planes, planes, stride=stride),
                tf.keras.layers.BatchNormalization(),
            ])
        else:
            self.downsample = None

    def call(self, x, training=False):
        identity = x

        y = self.conv1(x)
        y = self.bn1(y, training=training)
        y = self.relu(y)
        y = self.conv2(y)
        y = self.bn2(y, training=training)

        if self.downsample is not None:
            identity = self.downsample(identity, training=training)

        out = self.relu(tf.keras.layers.add([identity, y]))
        return out


class ResNetFPN_8_2(tf.keras.Model):
    """ResNet+FPN, output resolution are 1/8 and 1/2.

    Each block has 2 layers.
    """

    def __init__(self):
        super(ResNetFPN_8_2, self).__init__()

        initial_dim = 128
        block_dims = [128, 196, 256]
        Block = BasicBlock

        self.in_planes = initial_dim

        # Initial convolutional layer
        self.conv1 = tf.keras.layers.Conv2D(
            filters=initial_dim,
            kernel_size=7,
            strides=2,
            padding='same',
            use_bias=False
        )
        self.bn1 = tf.keras.layers.BatchNormalization()
        self.relu = tf.keras.layers.ReLU()

        # ResNet layers
        self.layer1 = self._make_layer(Block, block_dims[0], stride=1)
        self.layer2 = self._make_layer(Block, block_dims[1], stride=2)
        self.layer3 = self._make_layer(Block, block_dims[2], stride=2)

        # FPN upsample
        self.layer3_outconv = conv1x1(block_dims[2], block_dims[2])
        self.layer2_outconv = conv1x1(block_dims[1], block_dims[2])
        self.layer2_outconv2 = tf.keras.Sequential([
            conv3x3(block_dims[2], block_dims[2]),
            tf.keras.layers.BatchNormalization(),
            tf.keras.layers.ReLU(),
            conv3x3(block_dims[2], block_dims[1]),
        ])
        self.layer1_outconv = conv1x1(block_dims[0], block_dims[1])
        self.layer1_outconv2 = tf.keras.Sequential([
            conv3x3(block_dims[1], block_dims[1]),
            tf.keras.layers.BatchNormalization(),
            tf.keras.layers.ReLU(),
            conv3x3(block_dims[1], block_dims[0]),
        ])

        # Финальные слои для преобразования в 1 канал
        self.final_conv_x3 = tf.keras.layers.Conv2D(
            filters=1,
            kernel_size=1,
            padding='same',
            activation='sigmoid'  # Используйте активацию по необходимости
        )
        self.final_conv_x1 = tf.keras.layers.Conv2D(
            filters=1,
            kernel_size=1,
            padding='same',
            activation='sigmoid'
        )

    def _make_layer(self, block, planes, stride=1):
        layers = []
        layers.append(block(self.in_planes, planes, stride=stride))
        self.in_planes = planes
        layers.append(block(self.in_planes, planes, stride=1))
        return tf.keras.Sequential(layers)

    def call(self, x, training=False):
        # ResNet Backbone
        x0 = self.conv1(x)
        x0 = self.bn1(x0, training=training)
        x0 = self.relu(x0)

        x1 = self.layer1(x0, training=training)  # 1/2
        x2 = self.layer2(x1, training=training)  # 1/4
        x3 = self.layer3(x2, training=training)  # 1/8

        # FPN
        x3_out = self.layer3_outconv(x3)

        x2_out = self.layer2_outconv(x2)
        x3_out_2x = tf.image.resize(
            x3_out,
            size=tf.shape(x2_out)[1:3],
            method='bilinear'
        )
        x2_out = x2_out + x3_out_2x
        x2_out = self.layer2_outconv2(x2_out, training=training)

        x1_out = self.layer1_outconv(x1)
        x2_out_2x = tf.image.resize(
            x2_out,
            size=tf.shape(x1_out)[1:3],
            method='bilinear'
        )
        x1_out = x1_out + x2_out_2x
        x1_out = self.layer1_outconv2(x1_out, training=training)

        x3_out = self.final_conv_x3(x3_out)
        x1_out = self.final_conv_x1(x1_out)

        return [x3_out, x1_out]


# Пример использования:
input_image = tf.random.uniform([1, 200, 250, 1])  # Входная форма: [batch_size, H, W, channels]
model = ResNetFPN_8_2()
outputs = model(input_image, training=False)
model.summary()

print('Output shapes:')
print('x3_out:', outputs[0].shape)
print('x1_out:', outputs[1].shape)