import torch
a1 = torch.rand(4, 4)
a2 = torch.ones(4, 4)
a3 = torch.zeros(4, 4)
print(a1)
print(torch.where(a1 > 0.5, a2, a3))

ee462d22ee87ecae29505a60a78c511b02443ca9
<mask token>

<mask token>
print(a1)
print(torch.where(a1 > 0.5, a2, a3))

<mask token>
a1 = torch.rand(4, 4)
a2 = torch.ones(4, 4)
a3 = torch.zeros(4, 4)
print(a1)
print(torch.where(a1 > 0.5, a2, a3))

import torch
a1 = torch.rand(4, 4)
a2 = torch.ones(4, 4)
a3 = torch.zeros(4, 4)
print(a1)
print(torch.where(a1 > 0.5, a2, a3))
