INNER CODE UNIT · Python
test_batch_func_shapes
MITDeepLearning/introtodeeplearning · mitdeeplearning/lab1.py:80
def test_batch_func_shapes(func, args):
dataset, seq_length, batch_size = args
x, y = func(*args)
correct = (batch_size, seq_length)
assert (
x.shape == correct
), "[FAIL] test_batch_func_shapes: x {} is not correct shape {}".format(
x.shape, correct
)
assert (
y.shape == correct
), "[FAIL] test_batch_func_shapes: y {} is not correct shape {}".format(
y.shape, correct
)
print("[PASS] test_batch_func_shapes")
return True