def init_program_state(args): global xp, USE_LSTM, USE_GPU, HIDDEN_SIZE xp = UF.select_wrapper(not args.use_cpu) HIDDEN_SIZE = args.hidden_size USE_GPU = not args.use_cpu USE_LSTM = args.model == "lstm"
def init_wrapper(use_gpu): global xp xp = UF.select_wrapper(use_gpu)