MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / get_size

Method get_size

tensorflow/python/keras/engine/data_adapter.py:125–138  ·  view source on GitHub ↗

Return the size (number of batches) for the dataset created. For certain type of the data input, the number of batches is known, eg for Numpy data, the size is same as (number_of_element / batch_size). Whereas for dataset or python generator, the size is unknown since it may or may not

(self)

Source from the content-addressed store, hash-verified

123
124 @abc.abstractmethod
125 def get_size(self):
126 """Return the size (number of batches) for the dataset created.
127
128 For certain type of the data input, the number of batches is known, eg for
129 Numpy data, the size is same as (number_of_element / batch_size). Whereas
130 for dataset or python generator, the size is unknown since it may or may not
131 have a end state.
132
133 Returns:
134 int, the number of batches for the dataset, or None if it is unknown. The
135 caller could use this to control the loop of training, show progress bar,
136 or handle unexpected StopIteration error.
137 """
138 raise NotImplementedError
139
140 @abc.abstractmethod
141 def batch_size(self):

Callers 12

get_sizeMethod · 0.45
test_size_numpyMethod · 0.45
test_sizeMethod · 0.45
test_partial_batchMethod · 0.45
test_sizeMethod · 0.45
test_sizeMethod · 0.45
test_sizeMethod · 0.45
fitMethod · 0.45
_model_iterationMethod · 0.45

Calls

no outgoing calls

Tested by 7

test_size_numpyMethod · 0.36
test_sizeMethod · 0.36
test_partial_batchMethod · 0.36
test_sizeMethod · 0.36
test_sizeMethod · 0.36
test_sizeMethod · 0.36