MCPcopy Create free account
hub / github.com/chaoshangcs/GTS / get_iterator

Method get_iterator

lib/utils.py:37–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 self.ys = ys
36
37 def get_iterator(self):
38 self.current_ind = 0
39
40 def _wrapper():
41 while self.current_ind < self.num_batch:
42 start_ind = self.batch_size * self.current_ind
43 end_ind = min(self.size, self.batch_size * (self.current_ind + 1))
44 x_i = self.xs[start_ind: end_ind, ...]
45 y_i = self.ys[start_ind: end_ind, ...]
46 yield (x_i, y_i)
47 self.current_ind += 1
48
49 return _wrapper()
50
51
52class StandardScaler:

Callers 3

_setup_graphMethod · 0.80
evaluateMethod · 0.80
_trainMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected