提交 c0257f0a 编写于 作者: J JiayiFeng

Add comments

上级 5aa440fd
...@@ -20,7 +20,14 @@ namespace paddle { ...@@ -20,7 +20,14 @@ namespace paddle {
namespace operators { namespace operators {
namespace reader { namespace reader {
// 'Double buffer' means we shall maintain two batch of input data at the same
// time. So the kCacheSize shoul be at least 2.
static constexpr size_t kCacheSize = 2; static constexpr size_t kCacheSize = 2;
// There will be two bacthes out of the channel during training:
// 1. the one waiting to be sent to the channel
// 2. the one just be received from the channel, which is also being used by
// subsequent operators.
// So the channel size should be kChacheSize - 2
static constexpr size_t kChannelSize = 0; // kCacheSize - 2 static constexpr size_t kChannelSize = 0; // kCacheSize - 2
class DoubleBufferReader : public framework::DecoratedReader { class DoubleBufferReader : public framework::DecoratedReader {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册