Пример #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));
 }