Hypernetworks - fix KeyError in statistics caching
Statistics logging has changed to {filename : list[losses]}, so it has to use loss_info[key].pop()
This commit is contained in:
parent
f2cc3f32d5
commit
b297cc3324
1 changed files with 2 additions and 2 deletions
|
@ -274,8 +274,8 @@ def log_statistics(loss_info:dict, key, value):
|
||||||
loss_info[key] = [value]
|
loss_info[key] = [value]
|
||||||
else:
|
else:
|
||||||
loss_info[key].append(value)
|
loss_info[key].append(value)
|
||||||
if len(loss_info) > 1024:
|
if len(loss_info[key]) > 1024:
|
||||||
loss_info.pop(0)
|
loss_info[key].pop(0)
|
||||||
|
|
||||||
|
|
||||||
def statistics(data):
|
def statistics(data):
|
||||||
|
|
Loading…
Reference in a new issue