Shortcuts

BaseVisBackend

class mmengine.visualization.BaseVisBackend(save_dir)[源代码]

Base class for visualization backend.

All backends must inherit BaseVisBackend and implement the required functions.

参数:

save_dir (str, optional) – The root directory to save the files produced by the backend.

add_config(config, **kwargs)[源代码]

Record the config.

参数:

config (Config) – The Config object

返回类型:

None

add_graph(model, data_batch, **kwargs)[源代码]

Record the model graph.

参数:
  • model (torch.nn.Module) – Model to draw.

  • data_batch (Sequence[dict]) – Batch of data from dataloader.

返回类型:

None

add_image(name, image, step=0, **kwargs)[源代码]

Record the image.

参数:
  • name (str) – The image identifier.

  • image (np.ndarray) – The image to be saved. The format should be RGB. Defaults to None.

  • step (int) – Global step value to record. Defaults to 0.

返回类型:

None

add_scalar(name, value, step=0, **kwargs)[源代码]

Record the scalar.

参数:
  • name (str) – The scalar identifier.

  • value (int, float) – Value to save.

  • step (int) – Global step value to record. Defaults to 0.

返回类型:

None

add_scalars(scalar_dict, step=0, file_path=None, **kwargs)[源代码]

Record the scalars’ data.

参数:
  • scalar_dict (dict) – Key-value pair storing the tag and corresponding values.

  • step (int) – Global step value to record. Defaults to 0.

  • file_path (str, optional) – The scalar’s data will be saved to the file_path file at the same time if the file_path parameter is specified. Defaults to None.

返回类型:

None

close()[源代码]

close an opened object.

返回类型:

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.

Read the Docs v: latest
Versions
latest
stable
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.1
v0.9.0
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.