| 73 | } |
| 74 | |
| 75 | Stream Stream::dynamic_batch( |
| 76 | int64_t buffer_size, |
| 77 | const std::string& key, |
| 78 | int64_t min_data_size, |
| 79 | int64_t max_data_size, |
| 80 | const std::unordered_map<std::string, double>& pad_values, |
| 81 | const std::unordered_map<std::string, int>& batch_dims, |
| 82 | bool shuffle, |
| 83 | bool drop_outliers, |
| 84 | int64_t max_skipped_samples, |
| 85 | int num_thread) const { |
| 86 | return Stream(std::make_shared<stream::DynamicBatch>( |
| 87 | self_, |
| 88 | buffer_size, |
| 89 | key, |
| 90 | min_data_size, |
| 91 | max_data_size, |
| 92 | pad_values, |
| 93 | batch_dims, |
| 94 | shuffle, |
| 95 | drop_outliers, |
| 96 | max_skipped_samples, |
| 97 | num_thread)); |
| 98 | } |
| 99 | |
| 100 | Stream Stream::partition(int64_t num_partitions, int64_t partition) const { |
| 101 | return Stream( |