Artificial Intelligence, Machine Learning, Deep Learning, Image Classification, Heartbeat.
self._common_step(batch, batch_idx) val_accuracy = self.accuracy(preds, targets) self.history['val_loss'].append(loss.item()) self.history['val_acc'].append(val_accuracy.item()) self.log_dict( {"val_loss": loss,"val_acc": val_accuracy}, on_step=False, on_epoch=True, prog_bar=True, ) return