| 9 | namespace data { |
| 10 | namespace stream { |
| 11 | Batch::Batch( |
| 12 | const std::shared_ptr<Stream>& stream, |
| 13 | int64_t batch_size, |
| 14 | const std::unordered_map<std::string, double>& pad_values, |
| 15 | const std::unordered_map<std::string, int>& batch_dims) |
| 16 | : stream_(stream), |
| 17 | batchSize_(batch_size), |
| 18 | padValues_(pad_values), |
| 19 | batchDims_(batch_dims) { |
| 20 | if (batch_size <= 0) { |
| 21 | throw std::runtime_error("Batch: batch size must be positive"); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | Sample Batch::next() const { |
| 26 | std::vector<Sample> samples; |
nothing calls this directly
no outgoing calls
no test coverage detected