示例#1
0
 public static Offset <FlatGraph> CreateFlatGraph(FlatBufferBuilder builder,
                                                  long id = 0,
                                                  VectorOffset variablesOffset = default(VectorOffset),
                                                  VectorOffset nodesOffset     = default(VectorOffset),
                                                  VectorOffset outputsOffset   = default(VectorOffset),
                                                  Offset <FlatConfiguration> configurationOffset = default(Offset <FlatConfiguration>))
 {
     builder.StartObject(5);
     FlatGraph.AddId(builder, id);
     FlatGraph.AddConfiguration(builder, configurationOffset);
     FlatGraph.AddOutputs(builder, outputsOffset);
     FlatGraph.AddNodes(builder, nodesOffset);
     FlatGraph.AddVariables(builder, variablesOffset);
     return(FlatGraph.EndFlatGraph(builder));
 }
示例#2
0
 public static Offset <FlatGraph> CreateFlatGraph(FlatBufferBuilder builder,
                                                  long id = 0,
                                                  VectorOffset variablesOffset = default(VectorOffset),
                                                  VectorOffset nodesOffset     = default(VectorOffset),
                                                  VectorOffset outputsOffset   = default(VectorOffset),
                                                  Offset <FlatConfiguration> configurationOffset = default(Offset <FlatConfiguration>),
                                                  VectorOffset placeholdersOffset   = default(VectorOffset),
                                                  VectorOffset lossVariablesOffset  = default(VectorOffset),
                                                  StringOffset trainingConfigOffset = default(StringOffset),
                                                  VectorOffset updaterStateOffset   = default(VectorOffset))
 {
     builder.StartObject(9);
     FlatGraph.AddId(builder, id);
     FlatGraph.AddUpdaterState(builder, updaterStateOffset);
     FlatGraph.AddTrainingConfig(builder, trainingConfigOffset);
     FlatGraph.AddLossVariables(builder, lossVariablesOffset);
     FlatGraph.AddPlaceholders(builder, placeholdersOffset);
     FlatGraph.AddConfiguration(builder, configurationOffset);
     FlatGraph.AddOutputs(builder, outputsOffset);
     FlatGraph.AddNodes(builder, nodesOffset);
     FlatGraph.AddVariables(builder, variablesOffset);
     return(FlatGraph.EndFlatGraph(builder));
 }
示例#3
0
 public static FlatGraph GetRootAsFlatGraph(ByteBuffer _bb, FlatGraph obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }