We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcd06e7 commit c019b44Copy full SHA for c019b44
src/TensorFlowNET.Core/Tensors/TensorShape.cs
@@ -145,6 +145,12 @@ public bool is_compatible_with(TensorShape shape2)
145
{
146
throw new NotImplementedException("TensorShape is_compatible_with");
147
}
148
+
149
+ public void assert_has_rank(int rank)
150
+ {
151
+ if (rank != ndim)
152
+ throw new ValueError(String.Format("Shape {0} must have rank {1}", ndim, rank));
153
+ }
154
155
[SuppressMessage("ReSharper", "ParameterHidesMember")]
156
public TensorShape with_rank_at_least(int rank)
0 commit comments