if not self.metrics:
self.metrics = ["accuracy"]
self.dropout_rate = dropout_rate
self.set_loss()
def set_loss(self):
if not self.num_classes:
return
After Change
self.dropout_rate = dropout_rate
if metrics is None:
metrics = ["accuracy"]
if loss is None:
loss = self.infer_loss()
super().__init__(loss=loss,
metrics=metrics,
**kwargs)