inv_stack_batch.py works