fix off-by-one error

master
CptCaptain 3 years ago
parent 2d26f7a9d0
commit d63fedd297
  1. 2
      create_syn_data.sh
  2. 6
      data/create_syn_data.py

@ -4,4 +4,4 @@ cd data/lcn
python setup.py build_ext --inplace
cd ../
python create_syn_data.py $2
python create_syn_data.py $1

@ -228,10 +228,10 @@ if __name__ == '__main__':
out_root.mkdir(parents=True, exist_ok=True)
start = 0
if len(sys.argv) >= 2 and isinstance(sys.argv[2], int):
start = sys.argv[2]
if len(sys.argv) >= 2 and isinstance(sys.argv[1], int):
start = sys.argv[1]
else:
if sys.argv[2] == '--resume':
if sys.argv[1] == '--resume':
try:
start = max([int(dir) for dir in os.listdir(out_root) if str.isdigit(dir)]) or 0
except:

Loading…
Cancel
Save