Question:
Mindinsight uses error reporting on modelart.
After adding the summary and training some epoch normally, the operation will report an error:
Solution:
When using SummaryCollector, you need to put the code block in if__name__ == __main__:
The official mindspire tutorial has been updated. You can refer to the writing method of the latest tutorial: collect summary data – mindspire master document
Codes like this:
def train():
summary_collector = SummaryCollector(summary_dir='./summary_dir')
...
model.train(...., callback=[summary_collector])
if __name__ == '__main__':
train()