MCPcopy Create free account
hub / github.com/cactus-compute/cactus / stats_pool

Method stats_pool

cactus/graph/graph_builder.cpp:1668–1674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1666}
1667
1668size_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
1676size_t CactusGraph::weighted_stats_pool(size_t input, size_t weights) {
1677 const auto& xin = get_output_buffer(input);

Callers 1

build_graphMethod · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected