Skip to content

Commit f188bb8

Browse files
UselessToucanmigueldeicaza
authored andcommitted
Various small fixes (migueldeicaza#150)
* Remove if block which is always false * Fix ExpectMeta assert
1 parent bb50d3a commit f188bb8

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

SampleTest/LowLevelTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void ExpectMeta (TFOperation op, string name, int expectedListSize, TFAttributeT
281281
var meta = op.GetAttributeMetadata (name);
282282
Assert (meta.IsList == (expectedListSize >= 0 ? true : false));
283283
Assert (expectedListSize == meta.ListSize);
284-
Assert (expectedTotalSize == expectedTotalSize);
284+
Assert (expectedTotalSize == meta.TotalSize);
285285
Assert (expectedType == meta.Type);
286286
}
287287

TensorFlowSharp/Tensorflow.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,7 @@ public long [] GetShape (TFOutput output, TFStatus status = null)
769769
public TFScope WithScope (string nameScopeDesc)
770770
{
771771
var scope = new TFScope (this);
772-
if (scope == null)
773-
CurrentNameScope = "";
774-
else if (CurrentNameScope.Length == 0)
772+
if (CurrentNameScope.Length == 0)
775773
CurrentNameScope = nameScopeDesc;
776774
else
777775
CurrentNameScope = CurrentNameScope + "/" + nameScopeDesc;

0 commit comments

Comments
 (0)