| 1666 | } |
| 1667 | |
| 1668 | size_t CactusGraph::stats_pool(size_t input) { |
| 1669 | const auto& xin = get_output_buffer(input); |
| 1670 | size_t batch = xin.shape[0]; |
| 1671 | size_t features = 1; |
| 1672 | for (size_t i = 1; i < xin.shape.size() - 1; ++i) features *= xin.shape[i]; |
| 1673 | return add_node(OpType::STATS_POOL, {input}, {batch, features * 2}); |
| 1674 | } |
| 1675 | |
| 1676 | size_t CactusGraph::weighted_stats_pool(size_t input, size_t weights) { |
| 1677 | const auto& xin = get_output_buffer(input); |