I am using NCF deep dive notebook, I am just wondering is there any way to plot the train loss graph ? is there any inbuilt function to plot this? If not can you tell me how to do it?
Any help is appreciated.
Thanks
K
You can use tf.summary.scalar() to write your metrics to tensorboard. Here you can find simple example.
For NCF in our repo, you can add summary writing part to:
def fit(self, data):
...
# output every self.verbose
if self.verbose and epoch_count % self.verbose == 0:
logger.info(
"Epoch %d [%.2fs]: train_loss = %.6f "
% (epoch_count, train_time, sum(train_loss) / len(train_loss))
)
# ... write mean(train_loss) into summary writer here ...
We do have a logging hook at reco_utils/common/tf_utils.py which are being used for wide-deep model, but it is for tf.Estimator API. You can refer the module to see how the summary writer is used.
@karthikraja95 does it help solve your problem? If so, please close the issue.
I am trying to use implement it. I will let you know the results. Thanks
Most helpful comment
You can use
tf.summary.scalar()to write your metrics to tensorboard. Here you can find simple example.For NCF in our repo, you can add summary writing part to:
We do have a logging hook at reco_utils/common/tf_utils.py which are being used for wide-deep model, but it is for tf.Estimator API. You can refer the module to see how the summary writer is used.