MCPcopy Create free account
hub / github.com/alibaba/MNN / _Fill

Function _Fill

express/NeuralNetWorkOp.cpp:858–864  ·  view source on GitHub ↗

Creates a variable filled with a scalar value. Args: dims: A variable. Must be 1-D Halide_Type_Int. Represents the shape of the output variable. value: A variable. 0-D (scalar). Value to fill the returned variable. Returns: A variable. Has the same type as value. */

Source from the content-addressed store, hash-verified

856A variable. Has the same type as value.
857*/
858VARP _Fill(VARP dims, VARP value) {
859 std::unique_ptr<OpT> fill(new OpT);
860 fill->type = OpType_Fill;
861 fill->main.type = OpParameter_Fill;
862 fill->main.value = new FillT;
863 return (Variable::create(Expr::create(std::move(fill), {dims, value})));
864}
865/*Constructs a variable by tiling a given variable.
866Args:
867input: A variable. 1-D or higher.

Callers 15

onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85

Calls 1

createFunction · 0.50

Tested by 2

runMethod · 0.68
runMethod · 0.68