e gc.
                  # Loss can also be computed fresh batch of training inputs.
                  train_info_dict['train_loss'].append(train_loss)
                  train_info_dict['step'].append(step)
                  <b>train_data_file = os.path.join(conf.cachedir,'traindata.json')
                  with open(train_data_file,'w') as f:
                      json.dump(train_info_dict,f)</b>
                      
                  logging.info(f'step:{step}, train loss:{train_loss}')
                 