Skip to content

Commit 9308d67

Browse files
more gradient optimizer tests
fix evaluate Not needed assert removed# This is a combination of 3 commits. more gradient optimizer tests fix evaluate Not needed assert removed
1 parent b617d89 commit 9308d67

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

test/Tensorflow.UnitTest/PythonTest.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -211,27 +211,6 @@ public void assertAllCloseAccordingToType<T>(
211211
var givenAsDouble = given.Select(x => Convert.ToDouble(x)).ToArray();
212212
CollectionAssert.AreEqual(expected, givenAsDouble, new CollectionComparer(eps));
213213
}
214-
215-
public void assertAllCloseAccordingToType<T>(
216-
double value,
217-
NDArray array2,
218-
double eps = 1e-5) where T : struct
219-
{
220-
// TODO: check if any of arguments is not double and change toletance
221-
// remove array2AsDouble and cast expected instead
222-
var givenAsDouble = array2.Select(x => { double v = x; return v; }).ToArray();
223-
224-
if (array2.shape.IsScalar)
225-
{
226-
double value2 = array2;
227-
Assert.AreEqual(value, value2, eps);
228-
return;
229-
}
230-
var array1 = np.ones_like(array2) * value;
231-
CollectionAssert.AreEqual(array1.ToArray(), array2.ToArray(), new CollectionComparer(eps));
232-
233-
//TODO: Assert.IsTrue(np.allclose(array1, array2, rtol: eps));
234-
}
235214

236215
public void assertProtoEquals(object toProto, object o)
237216
{

0 commit comments

Comments
 (0)