42)
torch.manual_seed(= torch.randn(100000)+3
t plot(t)
π View as a histogram
plot
plot (x:torch.Tensor, center:str='zero', max_s:int=10000, plt0:Any=True, ax:Optional[matplotlib.axes._axes.Axes]=None)
Type | Default | Details | |
---|---|---|---|
x | Tensor | Tensor to explore | |
center | str | zero | Center plot on zero , mean , or range |
max_s | int | 10000 | Draw up to this many samples. =0 to draw all |
plt0 | Any | True | Take zero values into account |
ax | Optional | None | Optionally provide a matplotlib axes. |
Returns | PlotProxy |
="range") plot(t, center
="mean") plot(t, center
-3)) plot(torch.nn.functional.relu(t
-3), plt0=False) plot(torch.nn.functional.relu(t
= plt.subplots(figsize=(6, 2))
fig, ax,
fig.tight_layout()=ax); plot(t, ax