Shortcuts

PaviGenVisBackend

class mmedit.visualization.PaviGenVisBackend(save_dir: str, exp_name: Optional[str] = None, labels: Optional[str] = None, project: Optional[str] = None, model: Optional[str] = None, description: Optional[str] = None)[source]

Visualization backend for Pavi.

add_image(name: str, image: numpy.array, step: int = 0, **kwargs) None[source]

Record the image to Pavi.

Parameters
  • name (str) – The image identifier.

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

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

add_scalar(name: str, value: Union[int, float, torch.Tensor, numpy.ndarray], step: int = 0, **kwargs) None[source]

Record the scalar data to Pavi.

Parameters
  • name (str) – The scalar identifier.

  • value (int, float, torch.Tensor, np.ndarray) – Value to save.

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

add_scalars(scalar_dict: dict, step: int = 0, file_path: Optional[str] = None, **kwargs) None[source]

Record the scalars to Pavi.

The scalar dict will be written to the default and specified files if file_path is specified.

Parameters
  • scalar_dict (dict) – Key-value pair storing the tag and corresponding values. The value must be dumped into json format.

  • step (int) – Global step value to record. Default 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. Default to None.

property experiment: mmedit.visualization.vis_backend.GenVisBackend

Return the experiment object associated with this visualization backend.

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.