什么是参数“容量"?在 tf.train.string_input_producer() 中 [英] what is the argument "capacity" for in tf.train.string_input_producer()

查看:32
本文介绍了什么是参数“容量"?在 tf.train.string_input_producer() 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

函数的capacity参数tf.train.string_input_producer(string_tensor, num_epochs=None, shuffle=True, seed=None, capacity=32, shared_name=None, name=None) 对我来说相当模糊.

The capacity argument of the function tf.train.string_input_producer(string_tensor, num_epochs=None, shuffle=True, seed=None, capacity=32, shared_name=None, name=None) is rather vague for me.

这里设置capacity参数是什么意思,和string_tensor参数的长度有什么关系.一个例子将是美妙的.非常感谢.

What does it mean to set the capacity argument here, does it have anything to do with the length of the argument string_tensor. An example will be wonderful. Many thanks.

推荐答案

Capacity 是队列的大小,因此在您的示例中,队列运行器默认最多可以将 32 个字符串加入队列

Capacity is the size of the Queue, so in your example, the queue runner can enqueue up to 32 strings into the queue by default

这篇关于什么是参数“容量"?在 tf.train.string_input_producer() 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆