TooTouch / MemSeg

Unofficial re-implementation of MemSeg for Anomaly Detection
MIT License
184 stars 31 forks source link

key error "state['best_step']" line 160 in train.py #1

Closed cw9000 closed 2 years ago

cw9000 commented 2 years ago

when running main.py with a yaml config it finishes with an error I believe it is an easy fix. on line 156 just change it to this: state.update({'latest_step':step})

TooTouch commented 2 years ago

Hi, @cw9000

Thank you for letting me know. I fix it.

https://github.com/TooTouch/MemSeg/commit/f4f625964dff3c77c678402bf328b9326fdcc165

https://github.com/TooTouch/MemSeg/blob/f4f625964dff3c77c678402bf328b9326fdcc165/train.py#L152-L161