{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"I was unable to launch the tensorboard in the notebook, so I got the loss data like this","metadata":{}},{"cell_type":"code","source":"import pandas as pd\nfrom matplotlib import pyplot as plt\nimport tensorflow as tf\nimport struct\nfrom tensorflow.python.summary.summary_iterator import summary_iterator","metadata":{"execution":{"iopub.status.busy":"2021-12-23T11:59:13.525681Z","iopub.execute_input":"2021-12-23T11:59:13.526009Z","iopub.status.idle":"2021-12-23T11:59:18.759627Z","shell.execute_reply.started":"2021-12-23T11:59:13.525919Z","shell.execute_reply":"2021-12-23T11:59:18.758604Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# View summary\n%load_ext tensorboard\n%tensorboard --inspect --event_file=../input/cots3-tf/cots_efficientdet_d0/train/events.out.tfevents.1639741910.c99baf65a5e4.274.0.v2 --tag=Loss/total_loss","metadata":{"execution":{"iopub.status.busy":"2021-12-23T11:59:18.762445Z","iopub.execute_input":"2021-12-23T11:59:18.762711Z","iopub.status.idle":"2021-12-23T11:59:29.819970Z","shell.execute_reply.started":"2021-12-23T11:59:18.762679Z","shell.execute_reply":"2021-12-23T11:59:29.819256Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Load losses\ntotal_loss=[]\nsteps=[]\nfor e in summary_iterator(\"../input/cots3-tf/cots_efficientdet_d0/train/events.out.tfevents.1639741910.c99baf65a5e4.274.0.v2\"):    \n    for v in e.summary.value:\n        if v.tag == 'Loss/total_loss':            \n            total_loss.append(struct.unpack('f', v.tensor.tensor_content)[0])            \n","metadata":{"execution":{"iopub.status.busy":"2021-12-23T11:59:29.821342Z","iopub.execute_input":"2021-12-23T11:59:29.821595Z","iopub.status.idle":"2021-12-23T11:59:30.373306Z","shell.execute_reply.started":"2021-12-23T11:59:29.821563Z","shell.execute_reply":"2021-12-23T11:59:30.372514Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#draw\nfig, ax = plt.subplots(1, 1, figsize=(30,15),facecolor='gray')\nplt.title(u'Loss/total_loss', color = 'black',  fontsize = 'x-large')\nlines = ax.plot(total_loss)\nplt.draw()","metadata":{"execution":{"iopub.status.busy":"2021-12-23T11:59:30.375320Z","iopub.execute_input":"2021-12-23T11:59:30.375634Z","iopub.status.idle":"2021-12-23T11:59:30.811049Z","shell.execute_reply.started":"2021-12-23T11:59:30.375597Z","shell.execute_reply":"2021-12-23T11:59:30.810123Z"},"trusted":true},"execution_count":null,"outputs":[]}]}