changed a bunch of places that use torch.cuda.empty_cache() to use torch_gc() instead
len(x) > 0
len(x) == 0