BaseVisBackend¶
- class mmengine.visualization.BaseVisBackend(save_dir)[source]¶
Base class for visualization backend.
All backends must inherit
BaseVisBackend
and implement the required functions.- Parameters:
save_dir (str, optional) – The root directory to save the files produced by the backend.
- add_config(config, **kwargs)[source]¶
Record the config.
- Parameters:
config (Config) – The Config object
- Return type:
None
- add_graph(model, data_batch, **kwargs)[source]¶
Record the model graph.
- Parameters:
model (torch.nn.Module) – Model to draw.
data_batch (Sequence[dict]) – Batch of data from dataloader.
- Return type:
None
- add_scalars(scalar_dict, step=0, file_path=None, **kwargs)[source]¶
Record the scalars’ data.
- Parameters:
- Return type:
None
- abstract property experiment: Any¶
Return the experiment object associated with this visualization backend.
The experiment attribute can get the visualization backend, such as wandb, tensorboard. If you want to write other data, such as writing a table, you can directly get the visualization backend through experiment.