Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/TensorFlowNET.Core/Framework/meta_graph.py.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ public static (MetaGraphDef, Dictionary<string, RefVariable>) export_scoped_meta
var graph = ops.get_default_graph();

var var_list = new Dictionary<string, RefVariable>();
var variables = graph.get_collection(ops.GraphKeys.GLOBAL_VARIABLES);
var variables = graph.get_collection(ops.GraphKeys.GLOBAL_VARIABLES) as List<RefVariable>;

foreach(var v in variables as List<RefVariable>)
if (variables != null)
{
var_list[v.name] = v;
foreach (var v in variables)
{
var_list[v.name] = v;
}
}

var scoped_meta_graph_def = create_meta_graph_def(
Expand Down