有没有办法从tfevents文件中提取标量摘要到CSV(最好是在tensorboard中)?
以下代码summary_dir在同一目录中生成tfevent文件.假设你让它运行,你会发现一些有趣的东西.您希望获取原始数据以供进一步调查.你会怎么做?
#!/usr/bin/env python
"""A very simple MNIST classifier."""
import argparse
import sys
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
ce_with_logits = tf.nn.softmax_cross_entropy_with_logits
FLAGS = None
def inference(x):
"""
Build the inference graph.
Parameters
----------
x : placeholder
Returns
-------
Output tensor with the computed logits.
"""
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.matmul(x, W) + b
return y
def loss(logits, labels):
"""
Calculate the loss from the logits and the labels.
Parameters …Run Code Online (Sandbox Code Playgroud)