How to implement the above code with tensoflow?

import torch
x = torch.rand(10, 5) * 120
min_wh = 60
max_wh = 9000
b = ((x[…, 2:4] < min_wh) | (x[…, 2:4] > max_wh)).any(1)
x[b, 4] = 0

How to implement the above code with tensoflow?

You can use the below functions