Skip to content

关于tfrecord数据访问的两点疑问 #4

Description

@JingyunLiang

来自CSDN,有两个问题不太明白,但不知为何无法发表评论。

1, 传入网络的时候,是应该用feed_dict模式(先使用val, l = sess.run([img_batch,
label_batch])获取数据),还是把img_batch直接定义为tensor?第二种情况是不是要定义两个computation
graph?
2,怎么知道数据已经全部训练一轮(即一个epoch)?因为我想单独计算每一个training
epoch的准确率和平均loss。当我设置
tf.train.string_input_producer([filename],num_epochs=10)时,即使设置
allow_smaller_final_batch=True' 如果训练集数目不能被batch整除,tf.train.shuffle_batch`会接连不断的返回固定长度的batch,直到队列结束
(epoch=10)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions