MCPcopy Create free account
hub / github.com/alibaba/graph-learn / batch

Method batch

graphlearn/python/gsl/dag_node.py:169–175  ·  view source on GitHub ↗
(self, batch_size)

Source from the content-addressed store, hash-verified

167 return self
168
169 def batch(self, batch_size):
170 assert isinstance(batch_size, int) and batch_size > 0
171 self._shape = (batch_size,)
172 self._add_param(pywrap.kBatchSize, batch_size)
173 self._add_param(pywrap.kEpoch, sys.maxsize >> 32)
174 self._add_param(pywrap.kStrategy, "by_order")
175 return self
176
177 def shuffle(self, traverse=False):
178 strategy_map = {True: "shuffle", False: "random"}

Calls 1

_add_paramMethod · 0.95