Skip to content

Commit

Permalink
black, isort
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandraVolokhova authored and alexhernandezgarcia committed Feb 9, 2024
1 parent 67cc2d7 commit c8c1613
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gflownet/gflownet.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
from gflownet.utils.buffer import Buffer
from gflownet.utils.common import (
batch_with_rest,
bootstrap_samples,
set_device,
set_float_precision,
tbool,
tfloat,
tlong,
torch2np,
bootstrap_samples
)


Expand Down Expand Up @@ -877,7 +877,10 @@ def estimate_logprobs_data(
each data point.
logprobs_std: torch.tensor
Bootstrap variances of the logprobs_estimates
Bootstrap std of the logprobs_estimates
probs_std: torch.tensor
Bootstrap std of the torch.exp(logprobs_estimates)
"""
print("Compute logprobs...", flush=True)
times = {}
Expand Down
1 change: 1 addition & 0 deletions gflownet/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ def chdir_random_subdir():
os.mkdir(cwd)
os.chdir(cwd)


def bootstrap_samples(tensor, num_samples):
"""
Bootstraps tensor along the last dimention
Expand Down

0 comments on commit c8c1613

Please sign in to comment.