Skip to content

Commit

Permalink
Tweak bin and sample_n defaults to produce smoother histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
spfrommer committed Dec 30, 2023
1 parent 9b4b603 commit 95f270f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions torchexplorer/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def watch(
log_freq: int = 500,
ignore_io_grad_classes: list[type] = [],
disable_inplace: bool = False,
bins: int = 20,
sample_n: Optional[int] = 100,
bins: int = 30,
sample_n: Optional[int] = 1000,
reject_outlier_proportion: float = 0.1,
time_log: tuple[str, Callable] = ('step', lambda module, step: step),
delay_log_multi_backward: bool = False,
Expand Down
2 changes: 1 addition & 1 deletion torchexplorer/vega/mock_vega_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def main():
model = torchvision.models.resnet18()
inplace_classes = [torchvision.models.resnet.BasicBlock]
structure_wrapper = api.watch(
model, log_freq=1, backend='none', bins=50, sample_n=500,
model, log_freq=1, backend='none', bins=20, sample_n=500,
ignore_io_grad_classes=inplace_classes, disable_inplace=True
)
X, y = torch.randn(5, 3, 32, 32), torch.randn(5, 1000)
Expand Down

0 comments on commit 95f270f

Please sign in to comment.