ai-starthon / AI_Starthon2019

60 stars 44 forks source link

nsml 에러 #224

Closed tae-ha closed 5 years ago

tae-ha commented 5 years ago

현재 tensorflow로 작성한 코드가 학습은 되는데 inference가 안되서 1_reg_dust에 올려주신 tf 코드를 참고하여 수정하고 있습니다. baseline tf 코드를 보니 아래와 같은 부분있어서 코드를 참고하여 수정했습니다.

# DONOTCHANGE: They are reserved for nsml
    args.add_argument('--mode', type=str, default='train', help='submit일때 해당값이 test로 설정됩니다.')
    args.add_argument('--iteration', type=str, default='0',
                      help='fork 명령어를 입력할때의 체크포인트로 설정됩니다. 체크포인트 옵션을 안주면 마지막 wall time 의 model 을 가져옵니다.')
    args.add_argument('--pause', type=int, default=0, help='model 을 load 할때 1로 설정됩니다.')

bind_nsml() 뒤에 if config.pause: 를 추가했고 학습이 시작되는 코드 앞에 if config.mode == 'train':을 추가했습니다. 그후에 run을 하면 아래와 같은 에러가 나오는데 답변 부탁드립니다.

if config.mode == 'train':
AttributeError: mode
User session exited