mindspore.ops.ImageSummary
- class mindspore.ops.ImageSummary[source]
This operator will put an image tensor to a summary file with protocol buffer format. It must be used with SummaryRecord or SummaryCollector, which specify the directory of the summary file. The summary file can be loaded and shown by MindInsight, see MindInsight documents for details.
- Inputs:
name (str) - The name of the input variable, it must not be an empty string.
value (Tensor) - The value of image, the rank of tensor must be 4.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore.nn as nn >>> from mindspore import ops >>> >>> >>> class Net(nn.Cell): ... def __init__(self): ... super(Net, self).__init__() ... self.summary = ops.ImageSummary() ... ... def construct(self, x): ... name = "image" ... self.summary(name, x) ... return x ...