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

Method Eye

src/opr/impl/tensor_gen.cpp:136–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134MGB_DYN_TYPE_OBJ_FINAL_IMPL(Eye);
135
136Eye::Eye(VarNode* shape, const Param& param, const OperatorNodeConfig& config)
137 : Super{shape->owner_graph(), config, "eye", {shape}}, m_param{param} {
138 add_input({shape});
139 add_output(None)
140 ->dtype(DType::from_enum(param.dtype))
141 .add_flag(VarNode::Flag::ALLOW_EMPTY_SHAPE);
142 add_equivalence_component<PODHash<Param>>(&m_param);
143}
144
145SymbolVar Eye::make(
146 SymbolVar shape, const Param& param, const OperatorNodeConfig& config) {

Callers 1

eyeFunction · 0.80

Calls 2

owner_graphMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected