Ejemplo n.º 1
0
 public override string AddInitializer(int value, Type type, string name = null, bool makeUniqueName = true)
 {
     name = AddVariable(name ?? "int32", makeUniqueName);
     _initializers.Add(OnnxUtils.MakeInt32(name, type, value));
     return(name);
 }
Ejemplo n.º 2
0
 /// Adds constant tensor into the graph.
 public override string AddInitializer(bool value, string name = null, bool makeUniqueName = true)
 {
     name = AddVariable(name ?? "bool", makeUniqueName);
     _initializers.Add(OnnxUtils.MakeInt32(name, typeof(bool), value ? 1 : 0));
     return(name);
 }