Skip to content

Commit 252543f

Browse files
committed
Fix import_meta_graph exception if variables is empty.
1 parent a2e7c9f commit 252543f

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

docs/source/MnistInRnn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Chapter. MNIST In RNN
2+
3+
### Recurrent Neural Networks
4+
5+
Recurrent Neural Networks (RNNs) are popular models that have shown great promise in sequential data classification task. The traditional neural network model cannot make the next prediction input based on the knowledge that has been learned before.

src/TensorFlowNET.Core/Framework/meta_graph.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ public static (Dictionary<string, VariableV1>, ITensorOrOperation[]) import_scop
142142

143143
break;
144144
default:
145-
throw new NotImplementedException("import_scoped_meta_graph_with_return_elements");
145+
Console.WriteLine($"Cannot identify data type for collection {col.Key}. Skipping.");
146+
break;
146147
}
147148
}
148149

src/TensorFlowNET.Core/TensorFlow.Binding.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ https://tensorflownet.readthedocs.io</Description>
2525
3: Add tf.nn.rnn_cell.BasicRNNCell and tf.nn.dynamic_rnn.
2626
4: Add EstimatorSpec.
2727
5: Add rnn.static_rnn.
28-
6: Add array_grad._SplitGrad().</PackageReleaseNotes>
28+
6: Add array_grad._SplitGrad().
29+
7: Fix import_meta_graph exception if variables is empty.</PackageReleaseNotes>
2930
<LangVersion>7.3</LangVersion>
3031
<FileVersion>0.13.0.0</FileVersion>
3132
<PackageLicenseFile>LICENSE</PackageLicenseFile>

src/TensorFlowNET.Core/Variables/variables.py.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public static VariableV1[] _all_saveable_objects(string scope = "")
6161
public static List<VariableV1> global_variables(string scope = null)
6262
{
6363
return ops.get_collection<VariableV1>(tf.GraphKeys.GLOBAL_VARIABLES, scope);
64-
6564
}
6665

6766
/// <summary>

0 commit comments

Comments
 (0)