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

Method reshape

dnn/src/common/basic_types.cpp:540–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540TensorLayout TensorLayout::reshape(const TensorShape& shape) const {
541 TensorLayout ret;
542 auto succ = try_reshape(ret, shape);
543 megdnn_throw_if(
544 !succ, tensor_reshape_error,
545 ssprintf(
546 "can not reshape from %s to %s", to_string().c_str(),
547 shape.to_string().c_str()));
548 return ret;
549}
550
551std::string TensorLayout::to_string() const {
552 std::string rst("{");

Callers 13

TEST_FFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
run_matmul_mk_formatFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
benchmark_target_algoFunction · 0.45
deduce_exec_layoutMethod · 0.45
execMethod · 0.45
execMethod · 0.45
set_conv_biasMethod · 0.45

Calls 2

to_stringFunction · 0.85
to_stringMethod · 0.45

Tested by 8

TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
run_matmul_mk_formatFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
benchmark_target_algoFunction · 0.36