MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_shape

Function get_shape

imperative/python/src/grad_override.cpp:58–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56namespace {
57
58ValueRef get_shape(ValueRef x) {
59 static auto op = GetVarShape::make();
60 return imperative::apply(*op, x)[0];
61}
62
63ValueRef reduce_to(ValueRef x, ValueRef s) {
64 static auto op = Reduce::make();

Callers 10

matrix_mul_grad_ruleFunction · 0.85
elemwise_grad_ruleFunction · 0.85
reshape_grad_ruleFunction · 0.85
broadcast_grad_ruleFunction · 0.85
subtensor_grad_ruleFunction · 0.85
reduce_grad_ruleFunction · 0.85
indexing_grad_ruleFunction · 0.85

Calls 2

makeFunction · 0.50
applyFunction · 0.50

Tested by

no test coverage detected