Help protect the Great Barrier Reef with TensorFlow on Kaggle Join Challenge


Base class for tests that need to test TensorFlow.

Child Classes

class failureException



Add a function, with arguments, to be called when the test is completed. Functions added are called on a LIFO basis and are called after tearDown on test failure or success.

Cleanup items are called even if setUp fails (unlike tearDown).


Add a type specific assertEqual style function to compare a type.

This method is for use by TestCase subclasses that need to register their own type equality functions to provide nicer error messages.

typeobj The data type to call this function on when both values are of the same type in assertEqual().
function The callable taking two arguments and an optional msg= argument that raises self.failureException with a useful error message when the two arguments are not equal.


View source

Asserts that two structures of numpy arrays or Tensors, have near values.

a and b can be arbitrarily nested structures. A layer of a nested structure can be a dict, namedtuple, tuple or list.

a The expected numpy ndarray, or anything that can be converted into a numpy ndarray (including Tensor), or any arbitrarily nested of structure of these.