/external/tensorflow/tensorflow/python/keras/engine/ |
D | training_eager_v1.py | 42 def _eager_metrics_fn(model, outputs, targets, sample_weights=None, masks=None): argument 71 sample_weights=sample_weights, 89 sample_weights=None, argument 134 if sample_weights: 135 sample_weights = [ 138 if val is not None else None for val in sample_weights 162 weights = sample_weights[i] if sample_weights else None 228 sample_weights=None, argument 261 sample_weights=sample_weights, 290 sample_weights=None, argument [all …]
|
D | training_arrays_v1.py | 49 sample_weights=None, argument 165 ins = _prepare_feed_values(model, inputs, targets, sample_weights, mode) 421 sample_weights=val_sample_weights, 486 def _prepare_feed_values(model, inputs, targets, sample_weights, mode): argument 506 model, inputs, targets, sample_weights, mode) 522 inputs, targets, sample_weights = model._standardize_user_data( 528 sample_weights = list(sample_weights or []) 529 ins = inputs + targets + sample_weights 565 sample_weights = None 571 sample_weights = inputs[len(model._feed_inputs) + len(model._feed_targets):] [all …]
|
D | training_utils.py | 65 def handle_partial_sample_weights(outputs, sample_weights, sample_weight_modes, argument 80 any_sample_weight = sample_weights is not None and any( 81 w is not None for w in sample_weights) 83 w is None for w in sample_weights) 89 return sample_weights, any_sample_weight, partial_sample_weight 93 list_to_tuple(sample_weights), 94 list_to_tuple(nest.flatten(sample_weights))) 103 for i, sw in enumerate(sample_weights):
|
D | data_adapter.py | 256 sample_weights=None, argument 264 x, y, sample_weights = _process_tensorlike((x, y, sample_weights)) 266 sample_weights, sample_weight_modes) 269 (sample_weights, _, _) = training_utils.handle_partial_sample_weights( 270 y, sample_weights, sample_weight_modes, check_all_flat=True) 272 inputs = pack_x_y_sample_weight(x, y, sample_weights) 584 sample_weights=None, argument 591 x, y, sample_weights = _process_tensorlike((x, y, sample_weights)) 593 sample_weights, sample_weight_modes) 596 (sample_weights, _, _) = training_utils.handle_partial_sample_weights( [all …]
|
D | training_v1.py | 1068 x, y, sample_weights = self._standardize_user_data( 1081 sample_weights=sample_weights, 1088 ins = x + list(y or []) + list(sample_weights or []) 1093 self._update_sample_weight_modes(sample_weights=sample_weights) 1150 x, y, sample_weights = self._standardize_user_data( 1160 sample_weights=sample_weights, 1167 inputs = x + list(y or []) + list(sample_weights or []) 1169 self._update_sample_weight_modes(sample_weights=sample_weights) 1474 def _update_sample_weight_modes(self, sample_weights=None): argument 1497 if sample_weights and any(s is not None for s in sample_weights): [all …]
|
D | training_generator_v1.py | 524 def predict_on_batch(x, y=None, sample_weights=None): # pylint: disable=unused-argument argument 744 x, y, sample_weights = model._standardize_user_data( 761 (x, y, sample_weights, val_x, val_y, 764 x, y, sample_weights, validation_split)) 772 model, (x, y, sample_weights), 797 x, y, sample_weights = model._standardize_user_data( 806 model, (x, y, sample_weights),
|
D | training_utils_v1_test.py | 201 sample_weights = np.array([0.5, 1., 1., 0., 2.]) 202 weights = training_utils_v1.standardize_weights(y, sample_weights) 203 self.assertAllClose(weights, sample_weights) 214 sample_weights = np.array([0.5, 1., 1., 0., 2.]) 216 weights = training_utils_v1.standardize_weights(y, sample_weights, 218 expected = sample_weights * np.array([0.5, 1., 0.5, 0.5, 1.5])
|
D | training_dataset_test.py | 220 sample_weights = np.ones((10), np.float32) 222 (inputs, targets, sample_weights)) 243 sample_weights = np.array([0.25, 0.5, 0.75, 1], np.float32) 245 (inputs, targets, sample_weights)).batch(2)
|
D | training_utils_v1.py | 1835 def split_training_and_validation_data(x, y, sample_weights, validation_split): argument 1848 if sample_weights: 1849 sample_weights, val_sample_weights = ( 1850 generic_utils.slice_arrays(sample_weights, 0, split_at), 1851 generic_utils.slice_arrays(sample_weights, split_at), 1855 return x, y, sample_weights, val_x, val_y, val_sample_weights
|
D | data_adapter_test.py | 662 self.adapter_cls(self.dataset_input, sample_weights=self.dataset_input) 721 self.generator_input, sample_weights=self.generator_input) 789 self.adapter_cls(self.sequence_input, sample_weights=self.sequence_input)
|
D | training_test.py | 2032 sample_weights = array_ops.constant( 2034 dataset = dataset_ops.Dataset.from_tensor_slices(sample_weights) 2035 sample_weights = dataset_ops.make_one_shot_iterator(dataset).get_next() 2036 sample_weights = training_utils_v1.standardize_sample_weights( 2037 sample_weights, model.output_names) 2040 model._compile_weights_loss_and_weighted_metrics(sample_weights)
|
/external/tensorflow/tensorflow/python/keras/distribute/ |
D | distributed_training_utils_v1.py | 276 sample_weights=None): argument 315 if sample_weights is not None: 317 sample_weights) 597 sample_weights = None 601 sample_weights = None 603 x, y, sample_weights = next_element 607 model._distribution_strategy, x, y, sample_weights) 608 return x, y, sample_weights 611 def _prepare_feed_values(model, inputs, targets, sample_weights, mode): argument 625 inputs, targets, sample_weights = _get_input_from_iterator(inputs, model) [all …]
|
D | distribute_strategy_test.py | 661 sample_weights = np.array([0.25, 0.5, 0.75, 1], np.float32) 667 sample_weight=sample_weights, 1579 sample_weights = np.array([0.25, 0.5, 0.75, 1], np.float32) 1581 (inputs, targets, sample_weights)).batch(2)
|
/external/tensorflow/tensorflow/python/keras/tests/ |
D | temporal_sample_weights_correctness_test.py | 107 def custom_generator_multi_io_temporal(self, sample_weights=None): argument 126 if sample_weights: 127 sw = nest.map_structure(lambda w: w[start:end], sample_weights) 434 sample_weights=[self.sample_weight_1, self.sample_weight_2]), 448 sample_weights={'output_2': self.sample_weight_2}), 476 sample_weights=[self.sample_weight_1, self.sample_weight_2]), 493 sample_weights={'output_2': self.sample_weight_2}),
|
/external/tensorflow/tensorflow/python/keras/ |
D | metrics_correctness_test.py | 48 def custom_generator_multi_io(sample_weights=None): argument 61 if sample_weights: 62 sw = nest.map_structure(lambda w: w[start:end], sample_weights) 308 sample_weights=[self.sample_weight_1, self.sample_weight_2]), 317 sample_weights={'output_2': self.sample_weight_2}), 332 sample_weights=[self.sample_weight_1, self.sample_weight_2]), 340 sample_weights={'output_2': self.sample_weight_2}), 700 sample_weights=[self.sample_weight_1, self.sample_weight_2]), 711 sample_weights=[self.sample_weight_1, self.sample_weight_2]),
|