コード例 #1
0
ファイル: lm.py プロジェクト: philip30/chainn
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"
コード例 #2
0
ファイル: rnn-pos.py プロジェクト: philip30/chainn
def init_wrapper(use_gpu):
    global xp
    xp = UF.select_wrapper(use_gpu)