You need to write your CondConv custom layer like this (not personally tested):

  

      github.com
  

  
    prstrive/CondConv-tensorflow/blob/master/network/condconv.py 4


    import tensorflow as tf
from config import WEIGHT_DECAY
from tensorflow.keras import layers


def conv2d(kernel_size, stride, filters, kernel_regularizer=tf.keras.regularizers.l2(WEIGHT_DECAY), padding="same", use_bias=False,
           kernel_initializer="he_normal", **kwargs):
    return layers.Conv2D(kernel_size=kernel_size, strides=stride, filters=filters, kernel_regularizer=kernel_regularizer, padding=padding,
                         use_bias=use_bias, kernel_initializer=kernel_initializer, **kwargs)


class Routing(layers.Layer):
    def __init__(self, out_channels, dropout_rate, temperature=30, **kwargs):
        super(Routing, self).__init__(**kwargs)
        self.avgpool = layers.GlobalAveragePooling2D()
        self.dropout = layers.Dropout(rate=dropout_rate)
        self.fc = layers.Dense(units=out_channels)
        self.softmax = layers.Softmax()
        self.temperature = temperature




  This file has been truncated. show original

  

  
    
    
  

  


Centernet models are available in the Model Gardens research section:

  
      

      github.com
  

  
    

tensorflow/models

  master/research/object_detection

  Models and examples built with TensorFlow. Contribute to tensorflow/models development by creating an account on GitHub.