Browse Source

Remove debug informations before.

tags/v0.100.5-BERT-load
Yaohui Liu 2 years ago
parent
commit
67cf274f7f
No known key found for this signature in database GPG Key ID: E86D01E1809BD23E
3 changed files with 3 additions and 13 deletions
  1. +1
    -5
      src/TensorFlowNET.Core/Training/Saving/SavedModel/function_deserialization.cs
  2. +0
    -6
      src/TensorFlowNET.Core/Training/Saving/SavedModel/loader.cs
  3. +2
    -2
      test/TensorFlowNET.Keras.UnitTest/Layers/ModelSaveTest.cs

+ 1
- 5
src/TensorFlowNET.Core/Training/Saving/SavedModel/function_deserialization.cs View File

@@ -116,12 +116,8 @@ namespace Tensorflow.Training.Saving.SavedModel
} }


Dictionary<string, ConcreteFunction> loaded_gradients = new(); Dictionary<string, ConcreteFunction> loaded_gradients = new();
// Debug(Rinne)
var temp = _sort_function_defs(library, function_deps);
int i = 0;
foreach (var fdef in temp)
foreach (var fdef in _sort_function_defs(library, function_deps))
{ {
i++;
var orig_name = _fix_fdef_in_place(fdef, functions, load_shared_name_suffix, new_gradient_op_types); var orig_name = _fix_fdef_in_place(fdef, functions, load_shared_name_suffix, new_gradient_op_types);


object structured_input_signature = null; object structured_input_signature = null;


+ 0
- 6
src/TensorFlowNET.Core/Training/Saving/SavedModel/loader.cs View File

@@ -214,12 +214,6 @@ namespace Tensorflow
continue; continue;
} }
var proto = _proto.Nodes[node_id]; var proto = _proto.Nodes[node_id];
if(node_id == 10522)
{
// Debug(Rinne)
Console.WriteLine();
}
var temp = _get_node_dependencies(proto);
foreach (var dep in _get_node_dependencies(proto).Values.Distinct()) foreach (var dep in _get_node_dependencies(proto).Values.Distinct())
{ {
deps.Add(dep); deps.Add(dep);


+ 2
- 2
test/TensorFlowNET.Keras.UnitTest/Layers/ModelSaveTest.cs View File

@@ -18,8 +18,8 @@ namespace TensorFlowNET.Keras.UnitTest
{ {
var model = GetFunctionalModel(); var model = GetFunctionalModel();
var config = model.get_config(); var config = model.get_config();
Debug.Assert(config is ModelConfig);
var new_model = new ModelsApi().from_config(config as ModelConfig);
Debug.Assert(config is FunctionalConfig);
var new_model = new ModelsApi().from_config(config as FunctionalConfig);
Assert.AreEqual(model.Layers.Count, new_model.Layers.Count); Assert.AreEqual(model.Layers.Count, new_model.Layers.Count);
} }




Loading…
Cancel
Save