tensorflow / tensor2tensor

Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Apache License 2.0
15.5k stars 3.49k forks source link

How to plot accuracy in a Text2Class problem? #1715

Open abnf opened 5 years ago

abnf commented 5 years ago

Description

...

Environment information

OS: 
Version: tf-cpu.1-14.m34
Based on: Debian GNU/Linux 9.9 (stretch) (GNU/Linux 4.9.0-9-amd64 x86_64\n)
Linux cpu1-vm 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64

$ pip freeze | grep tensor
# your output here
jupyter-tensorboard==0.1.10
mesh-tensorflow==0.0.5
tensor2tensor==1.13.4
tensorboard==1.14.0
tensorflow==1.14.0
tensorflow-datasets==1.2.0
tensorflow-estimator==1.14.0
tensorflow-hub==0.5.0
tensorflow-metadata==0.14.0
tensorflow-probability==0.7.0rc0
tensorflow-serving-api==1.13.0rc1
tensorflow-transform==0.14.0

$ python -V
# your output here
Python 2.7.13

I add

  def eval_metrics(self):
      return [
          metrics.Metrics.ACC
      ]

to my Text2ClassProblem problem but it does not show on TensorBoard. TensorBoard only plots loss. How to plot accuracy?

abnf commented 5 years ago

tensor2tensor plots the metrics I want at the end of training. How can I see these metrics printed every 1k steps instead of only at the very end of training? Right now the only way to see these metrics every 1k steps is to run entire runs of training with lengths 1k, 2k, 3k.

tensorboard
abnf commented 5 years ago

These targets I want to plot many times over the course of one training, but they plot only when the evaluation runs which runs only once at the end of training. How can I have many evals over the course of training?

eval