def main(opt, train_type): if opt.rnn_type == "SRU" and not opt.gpuid: raise AssertionError("Using SRU requires -gpuid set.") if opt.epochs: raise AssertionError("-epochs is deprecated please use -train_steps.") if len(opt.gpuid) > 1: multi_main(opt, train_type) else: single_main(opt, train_type)
def main(opt): if opt.rnn_type == "SRU" and not opt.gpuid: raise AssertionError("Using SRU requires -gpuid set.") if opt.epochs: raise AssertionError("-epochs is deprecated please use -train_steps.") if opt.truncated_decoder > 0 and opt.accum_count > 1: raise AssertionError("BPTT is not compatible with -accum > 1") if len(opt.gpuid) > 1: multi_main(opt) else: single_main(opt)