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

Function make

src/opr/impl/loop/grad.cpp:327–330  ·  view source on GitHub ↗

! * \param var the vars whose grads should be overwritten * \param grad the vars to provide grad * \brief return a placeholder scalar var to get grad w.r.t. inputs */

Source from the content-addressed store, hash-verified

325 * \brief return a placeholder scalar var to get grad w.r.t. inputs
326 */
327 static SymbolVar make(ComputingGraph* graph, GradInfoArray&& grad) {
328 return graph->insert_opr(std::make_unique<GradProxy>(graph, std::move(grad)))
329 ->output(0);
330 }
331
332private:
333 GradInfoArray m_grad;

Callers 5

shallow_copyMethod · 0.70
GradDescMethod · 0.70
init_virtual_lossMethod · 0.70
init_assignmentsMethod · 0.70

Calls 2

outputMethod · 0.45
insert_oprMethod · 0.45

Tested by

no test coverage detected