MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / get_batch

Function get_batch

AutoML/darts-master/rnn/utils.py:25–29  ·  view source on GitHub ↗
(source, i, args, seq_len=None, evaluation=False)

Source from the content-addressed store, hash-verified

23
24
25def get_batch(source, i, args, seq_len=None, evaluation=False):
26 seq_len = min(seq_len if seq_len else args.bptt, len(source) - 1 - i)
27 data = Variable(source[i:i+seq_len], volatile=evaluation)
28 target = Variable(source[i+1:i+1+seq_len])
29 return data, target
30
31
32def create_exp_dir(path, scripts_to_save=None):

Callers 5

evaluateFunction · 0.90
trainFunction · 0.90
evaluateFunction · 0.90
evaluateFunction · 0.90
trainFunction · 0.90

Calls

no outgoing calls

Tested by 1

evaluateFunction · 0.72