Delete the last remaining set_dynamic_columns interface part
This commit is contained in:
parent
44ad905e2a
commit
78cd9806b6
|
@ -334,9 +334,6 @@ class Dataset:
|
||||||
self.saved_output_shapes = None
|
self.saved_output_shapes = None
|
||||||
self.estimated_output_shapes = None
|
self.estimated_output_shapes = None
|
||||||
self.runtime_context = None
|
self.runtime_context = None
|
||||||
self.dynamic_setting = [False, None]
|
|
||||||
self.saved_min_shapes = None
|
|
||||||
self.saved_max_shapes = None
|
|
||||||
self._col_names = None
|
self._col_names = None
|
||||||
self.dataset_size = None
|
self.dataset_size = None
|
||||||
self._batch_size = None
|
self._batch_size = None
|
||||||
|
@ -1644,23 +1641,6 @@ class Dataset:
|
||||||
|
|
||||||
return self.dataset_size
|
return self.dataset_size
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def __check_dynamic_column_name(dynamic_columns, dataset_columns):
|
|
||||||
for column in dynamic_columns:
|
|
||||||
if column not in dataset_columns:
|
|
||||||
raise RuntimeError("dynamic column [" + column + "] does not match any column in dataset: " +
|
|
||||||
str(dataset_columns))
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def __check_dynamic_column_shape(data, col, dynamic_columns):
|
|
||||||
shape_mismatch = "dynamic column [" + col + "] with shape " + str(dynamic_columns[col]) + \
|
|
||||||
" does not match dataset column [" + col + "] with shape " + str(list(data[col].shape))
|
|
||||||
if data[col].ndim != len(dynamic_columns[col]):
|
|
||||||
raise RuntimeError(shape_mismatch)
|
|
||||||
for dim in range(len(dynamic_columns[col])):
|
|
||||||
if dynamic_columns[col][dim] is not None and dynamic_columns[col][dim] != data[col].shape[dim]:
|
|
||||||
raise RuntimeError(shape_mismatch)
|
|
||||||
|
|
||||||
def num_classes(self):
|
def num_classes(self):
|
||||||
"""
|
"""
|
||||||
Get the number of classes in a dataset.
|
Get the number of classes in a dataset.
|
||||||
|
|
|
@ -30,7 +30,6 @@ class MindData:
|
||||||
self._output_shapes = output_shapes
|
self._output_shapes = output_shapes
|
||||||
self._input_indexs = input_indexs
|
self._input_indexs = input_indexs
|
||||||
self._iter_num = 0
|
self._iter_num = 0
|
||||||
self.dynamic_setting = [False, None]
|
|
||||||
|
|
||||||
def get_dataset_size(self):
|
def get_dataset_size(self):
|
||||||
return self._size
|
return self._size
|
||||||
|
|
Loading…
Reference in New Issue