Skip to content

Commit

Permalink
Update torch_flow_dual_object.py
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Xiafeng authored Jun 28, 2023
1 parent 85f2bc6 commit a540d3d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1405,9 +1405,9 @@ def random_tensor(
):
if isinstance(requires_grad, generator):
requires_grad = requires_grad.value()
# if dtype == float and testing_complex:
# # Generate complex with the probability of 0.5
# dtype = complex if rng.integers(0, 2) == 1 else float
if dtype == float and testing_complex:
# Generate complex with the probability of 0.5
dtype = complex if rng.integers(0, 2) == 1 else float

pytorch_tensor = (
random_pytorch_tensor(
Expand Down

0 comments on commit a540d3d

Please sign in to comment.