Comment Comment by apaszke These ops are just not needed in PyTorch. while is just a Python while loop. Scan is a for loop, map is a list comprehension that applies modules. No need for anything fancy. parent apaszke 9 years ago