draugr.torch_utilities.writers.tensorboard.tensorboard_pytorch_writer.TensorBoardPytorchWriter¶
- class draugr.torch_utilities.writers.tensorboard.tensorboard_pytorch_writer.TensorBoardPytorchWriter(path: Union[str, Path] = PosixPath('/mnt/win/Users/Christian/ProjectsWin/Github/Pything/draugr/docs/Logs'), summary_writer_kws=None, *, interval: Optional[int] = 1, filters: Iterable = None, verbose: bool = False)[source]¶
Bases:
Writer
,ImageWriterMixin
,GraphWriterMixin
,HistogramWriterMixin
,BarWriterMixin
,LineWriterMixin
,SpectrogramWriterMixin
,FigureWriterMixin
,InstantiationWriterMixin
,PrecisionRecallCurveWriterMixin
,EmbedWriterMixin
,ModuleParameterWriterMixin
,VideoWriterMixin
,MeshWriterMixin
Provides a pytorch-tensorboard-implementation writer interface
- __init__(path: Union[str, Path] = PosixPath('/mnt/win/Users/Christian/ProjectsWin/Github/Pything/draugr/docs/Logs'), summary_writer_kws=None, *, interval: Optional[int] = 1, filters: Iterable = None, verbose: bool = False)[source]¶
- Parameters
path –
summary_writer_kws –
kwargs –
Methods
__init__
([path, summary_writer_kws, ...])- param path
bar
(tag, values, step[, value_error, ...])- param x_label
blip
(tag[, step_i])- param tag
close
()description
embed
(tag, response[, metadata, label_img, ...])BORKED!
figure
(tag, figure, step, *[, global_step, ...])- param tag
filter
(tag)returns a boolean value, true if to be included, False if to be excluded
graph
(model, input_to_model[, verbose, ...])- param use_strict_trace
histogram
(tag, values, step[, bins, ...])- param tag
image
(tag, data, step, *[, data_formats, ...])- param self
instance
(instance, metrics, **kwargs)TODO: Not finished!
line
(tag, values, step[, x_labels, y_label, ...])- param x_label
mesh
(tag, data[, step])Data being vertices here.
open
()description
parameters
(model, step[, tag])- param model
precision_recall_curve
(tag, predictions, truths)- param tag
scalar
(tag, value[, step_i])- param tag
spectrogram
(tag, values, sample_rate, step)- param sample_rate
video
(tag, data[, step, frame_rate, input_dims])Shape:
Attributes
return: :rtype:
- bar(tag: str, values: list, step: int, value_error: float = None, x_labels: Sequence = None, y_label: str = 'Probabilities', x_label: str = 'Distribution', *, global_step=None, close=True, walltime=None) None [source]¶
- Parameters
x_label –
tag –
values –
step –
value_error –
x_labels –
y_label –
kwargs –
- embed(tag: str, response: Sequence, metadata: Optional[Any] = None, label_img: Optional[Any] = None, step: Optional[int] = None, *, global_step=None, metadata_header=None) None [source]¶
BORKED!
- Parameters
tag –
response –
metadata –
label_img –
step –
kwargs –
- Returns
- figure(tag: str, figure: Figure, step: int, *, global_step=None, close=True, walltime=None) None [source]¶
- Parameters
tag –
figure –
step –
kwargs –
- filter(tag: str) bool ¶
returns a boolean value, true if to be included, False if to be excluded
tag is in filter if not None and within interval for inclusion
- Parameters
tag –
- Returns
- Return type
- graph(model: Module, input_to_model: Tensor, verbose: bool = False, use_strict_trace: bool = True) None [source]¶
- Parameters
use_strict_trace –
verbose –
model –
input_to_model –
- histogram(tag: str, values: list, step: int, bins: Any = 'auto', *, global_step=None, walltime=None, max_bins=None) None [source]¶
- Parameters
tag –
values –
step –
bins –
kwargs –
- image(tag: str, data: Union[ndarray, Tensor, Image], step, *, data_formats: str = 'NCHW', multi_channel_method: MultiChannelMethodEnum = MultiChannelMethodEnum.seperate, seperate_channel_postfix: str = 'channel', seperate_image_postfix: str = 'image', global_step=None, walltime=None, dataformats='CHW') None [source]¶
- Parameters
self –
multi_channel_method –
seperate_channel_postfix –
seperate_image_postfix –
tag –
data –
step –
data_formats –
kwargs –
- instance(instance: dict, metrics: dict, **kwargs) None [source]¶
TODO: Not finished!
- Parameters
instance –
metrics –
- Returns
- line(tag: str, values: list, step: int, x_labels: Sequence = None, y_label: str = 'Magnitude', x_label: str = 'Sequence', plot_kws=None, *, global_step=None, close=True, walltime=None) None [source]¶
- Parameters
x_label –
plot_kws –
tag –
values –
step –
x_labels –
y_label –
kwargs –
- mesh(tag: str, data: Union[ndarray, Tensor, Image], step=None, **kwargs) None [source]¶
Data being vertices here.
Shape: (B,N,3) data: (B,N,3). (batch, number_of_vertices, channels) colors: (B,N,3). The values should lie in [0, 255] for type uint8 or [0, 1] for type float. faces: (B,N,3). The values should lie in [0, number_of_vertices] for type uint8.
- Parameters
tag –
data –
step –
kwargs –
- Returns
- parameters(model: Module, step: int, tag: str = '', **kwargs) None [source]¶
- Parameters
model –
step –
tag –
kwargs –
- precision_recall_curve(tag: str, predictions: Iterable, truths: Iterable, step: int = None, *, global_step=None, num_thresholds=127, weights=None, walltime=None) None [source]¶
- Parameters
tag –
predictions –
truths –
step –
kwargs –
- scalar(tag: str, value: Union[int, float], step_i: Optional[int] = None) None ¶
- Parameters
tag –
value –
step_i –
- spectrogram(tag: str, values: list, sample_rate: int, step: int, n_fft: int = 512, step_size=128, x_labels: Sequence = None, y_label: str = 'Frequency [Hz]', x_label: str = 'Time [sec]', plot_kws=None, *, global_step=None, close=True, walltime=None) None [source]¶
- Parameters
sample_rate –
n_fft –
step_size –
tag –
values –
step –
x_labels –
y_label –
x_label –
plot_kws –
kwargs –
- video(tag: str, data: Union[ndarray, Tensor, Image], step=None, frame_rate=30, input_dims=VideoInputDimsEnum.ntchw, **kwargs) None [source]¶
Shape:
- fastest expects vid_tensor: (N,T,C,H,W) .
The values should lie in [0, 255] for type uint8 or [0, 1] for type float.
- property writer: SummaryWriter¶
return: :rtype: