Hello All,
For building a custom model in keras, we can build a class that will extend keras.Model class. We can customize the training step with gradient tape, but how about customizing the prediction function that is usually called model.predict?
class MiniInception(tf.keras.Model):
def __init__(self, num_classes=10):
super(MiniInception, self).__init__()
def call(self, input_tensor, training=False, **kwargs):
# forward pass
def build_graph(self, raw_shape):
pass
I would like to call our custom predict MiniInception.custom_predict() not MiniInception.predict()? Can we do that please in keras?
Thanks.