def check_shape(tensors, shapes):
    """
    Verifies the tensors match the given shape, will raise an error if the shapes do not match

    :param tensors: ([TensorFlow Tensor]) The tensors that should be checked
    :param shapes: ([list]) The list of shapes for each tensor
    """
    i = 0
    for tensor, shape in zip(tensors, shapes):
        assert tensor.get_shape().as_list() == shape, 'id ' + str(i
            ) + ' shape ' + str(tensor.get_shape()) + str(shape)
        i += 1
