警告说明,我不太理解这是什么意思,为什么会有重复的值呢?loss每轮都是在变的呀
[WARNING] ME(15264:9768,MainProcess):2022-10-05-00:08:28.727.958 [mindspore\train\summary\summary_record.py:290] For "SummaryRecord.add_value", 'loss/scalar' has duplicate values. Only the newest one will be recorded.
相关记录部分的代码
summary_collect_frequency = 2
with SummaryRecord('./summary_dir', network=train_net) as summary_record:
for epoch in range(epochs):
step = 0
for columns in train_ds.create_dict_iterator():
data = shapeChange(columns['data'])
target = columns['target']
labels = target[:,0]
current_step = epoch * ds_train.get_dataset_size() + step
loss,_ = train_net(data, labels)
losses.update(loss, labels.shape[0])
if current_step % summary_collect_frequency == 0:
summary_record.add_value('scalar', 'loss', loss)
summary_record.record(current_step)
print(f"Epoch: [{epoch} / {opt.epochs}], "
f"step: [{step} / {steps}], "
f"loss: {loss}")
step = step + 1
****************************************************解答*****************************************************
For "SummaryRecord.add_value", 'loss/scalar' has duplicate values. Only the newest one will be recorded. 这条告警的意思是,名称为loss的Scalar被记录了多次。请确认是否除了上面代码提到的SummaryRecord, 同时使用了其它的Summary方式,比如ScarlarSummary