AttributeError: module 'torch' has no attribute 'logical_and'

I am getting above error my torch error, my torch version are torch 1.4.0+cpu
torchvision 0.5.0+cpu.

any help?

This method was introduced in 1.5.0 so you would need to update PyTorch to the latest stable version.

1 Like

Thank you that helped it.

Quick solution for an OR operation for earlier versions should also be

mask_or = (mask_x + mask_y) > 0