[英]How do I check accuracy of my training model using Tensorboard?
I'm running a CNN for image classification.我正在运行用于图像分类的 CNN。 Every 100 steps, a file is created in a folder either as: model.ckpt-0.data-00000-of-00001, model.ckpt-0.index, model.ckpt-0.meta.
每 100 步,就会在文件夹中创建一个文件:model.ckpt-0.data-00000-of-00001、model.ckpt-0.index、model.ckpt-0.meta。 There are also these files: graph.pbtxt and checkpoint.
还有这些文件:graph.pbtxt 和 checkpoint。
Which of these files would I use to view the accuracy of my training model in Tensorboard?我将使用这些文件中的哪个文件来查看 Tensorboard 中训练模型的准确性?
None of these contain the accuracy values, they are the definition of the model (graph.pbtxt) and the model weights (checkpoint / ckpt files).这些都不包含准确度值,它们是模型的定义(graph.pbtxt)和模型权重(checkpoint / ckpt 文件)。
By default the fit
method will output any losses or metrics (eg accuracy) you defined when you called compile
on the model, eg默认情况下,
fit
方法将输出您在模型上调用compile
时定义的任何损失或指标(例如准确性),例如
model.compile(optimizer="Adam", loss="mse", metrics=["mae", "acc"])
will compile the model with the mse
loss and the mae
and acc
metrics.将使用
mse
损失以及mae
和acc
指标编译模型。 The values will be printed at the end of each epoch, or more often if you change the verbose
argument when calling fit
这些值将在每个时代结束时打印,或者如果您在调用
fit
时更改verbose
参数,则会更频繁地打印
Perhaps the best way to visualise these values is to use Tensorboard .也许可视化这些值的最佳方法是使用Tensorboard 。 To do this you create a tensorboard callback (a callback is a class with methods that are called at the start / end of training, epoch and batch) which will write the metrics and other info into the training directory.
为此,您需要创建一个 tensorboard 回调(回调是一个具有在训练开始/结束时调用的方法、时期和批处理的类),它将指标和其他信息写入训练目录。
Then you may run tensorboard from inside the training directory, eg tensorboard --logdir=/path/to/training/dir
to get a nice web-based UI in which to monitor training.然后你可以从训练目录中运行 tensorboard,例如
tensorboard --logdir=/path/to/training/dir
以获得一个很好的基于 web 的 UI 来监控训练。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.