/external/tensorflow/tensorflow/python/keras/utils/ |
D | losses_utils.py | 60 def squeeze_or_expand_dimensions(y_pred, y_true, sample_weight): argument 109 if sample_weight is None: 112 sample_weight = ops.convert_to_tensor(sample_weight) 113 weights_shape = sample_weight.get_shape() 116 return y_pred, y_true, sample_weight 121 sample_weight = array_ops.squeeze(sample_weight, [-1]) 123 sample_weight = array_ops.expand_dims(sample_weight, [-1]) 124 return y_pred, y_true, sample_weight 127 weights_rank_tensor = array_ops.rank(sample_weight) 129 maybe_squeeze_weights = lambda: array_ops.squeeze(sample_weight, [-1]) [all …]
|
D | metrics_utils.py | 218 sample_weight=None): argument 293 y_pred, y_true, sample_weight = squeeze_or_expand_dimensions( 294 y_pred, y_true, sample_weight) 325 if sample_weight is not None: 327 math_ops.cast(sample_weight, dtype=dtypes.float32), y_pred)
|
/external/tensorflow/tensorflow/python/keras/ |
D | losses_test.py | 59 def __call__(self, y_true, y_pred, sample_weight=None): argument 193 sample_weight = constant_op.constant([1.2, 0.5]) 194 loss = mse_obj(y_true, y_pred, sample_weight=sample_weight) 233 loss = mse_obj(y_true, y_pred, sample_weight=2.3) 242 sample_weight = constant_op.constant([1.2, 3.4], shape=(2, 1)) 243 loss = mse_obj(y_true, y_pred, sample_weight=sample_weight) 252 sample_weight = constant_op.constant([3, 6, 5, 0, 4, 2], shape=(2, 3)) 253 loss = mse_obj(y_true, y_pred, sample_weight=sample_weight) 262 loss = mse_obj(y_true, y_pred, sample_weight=0) 269 sample_weight = constant_op.constant([3, 6, 5, 0], shape=(2, 2)) [all …]
|
D | metrics.py | 277 def update_state(self, values, sample_weight=None): argument 292 if sample_weight is not None: 293 sample_weight = math_ops.cast(sample_weight, self._dtype) 295 values, _, sample_weight = squeeze_or_expand_dimensions( 296 values, None, sample_weight) 299 sample_weight = weights_broadcast_ops.broadcast_weights( 300 sample_weight, values) 304 weight_ndim = K.ndim(sample_weight) 311 values = math_ops.multiply(values, sample_weight) 325 if sample_weight is None: [all …]
|
D | metrics_test.py | 81 result_t = m(100, sample_weight=0.5) 86 result_t = m([1, 5], sample_weight=[1, 0.2]) 92 result_t = m([1, 2], sample_weight=0.5) 97 result_t = m([1, 5], sample_weight=[[1], [0.2]]) 102 result_t = m([[1], [5]], sample_weight=[1, 0.2]) 107 result_t = m([[[1., 2.], [3., 2.], [0.5, 4.]]], sample_weight=[0.5]) 121 result_t = m(v, sample_weight=w) 210 result_t = m(100, sample_weight=0.5) 216 result_t = m([1, 5], sample_weight=[1, 0.2]) 223 result_t = m([1, 2], sample_weight=0.5) [all …]
|
D | metrics_confusion_matrix_test.py | 73 sample_weight = constant_op.constant((1., 1.5, 2., 2.5)) 74 result = fp_obj(y_true, y_pred, sample_weight=sample_weight) 99 sample_weight = ((1.0, 2.0, 3.0, 5.0), (7.0, 11.0, 13.0, 17.0), 102 result = fp_obj(y_true, y_pred, sample_weight=sample_weight) 153 sample_weight = constant_op.constant((1., 1.5, 2., 2.5)) 154 result = fn_obj(y_true, y_pred, sample_weight=sample_weight) 179 sample_weight = ((3.0,), (5.0,), (7.0,), (4.0,)) 181 result = fn_obj(y_true, y_pred, sample_weight=sample_weight) 221 sample_weight = constant_op.constant((1., 1.5, 2., 2.5)) 222 result = tn_obj(y_true, y_pred, sample_weight=sample_weight) [all …]
|
D | metrics_correctness_test.py | 140 sample_weight={ 154 sample_weight={ 164 mse1 = model.evaluate([x, x], [y, y], sample_weight=[w, w], batch_size=5)[3] 165 mse2 = model.evaluate([x, x], [y, y], sample_weight=[w, w], 172 sample_weight={ 181 sample_weight={ 277 sample_weight=self.weights, 287 self.x, self.y, batch_size=2, sample_weight=self.weights) 294 mse1 = model.evaluate(x, y, sample_weight=w, batch_size=5)[1] 295 mse2 = model.evaluate(x, y, sample_weight=w, batch_size=10)[1] [all …]
|
/external/tensorflow/tensorflow/python/keras/engine/ |
D | training.py | 542 sample_weight=None, argument 719 sample_weight=sample_weight, 743 sample_weight=sample_weight, 756 y, sample_weight, validation_split=validation_split) 774 training_utils.validate_dataset_input(x, y, sample_weight, 800 sample_weight=sample_weight, 816 sample_weight=val_sample_weights, 881 sample_weight=None, argument 977 sample_weight=sample_weight, 993 sample_weight=sample_weight, [all …]
|
D | training_utils.py | 400 def standardize_sample_weights(sample_weight, output_names): argument 401 return standardize_sample_or_class_weights(sample_weight, output_names, 618 sample_weight=None, argument 643 if isinstance(sample_weight, tuple): 644 sample_weight = sample_weight[0] 657 if sample_weight is not None and len(sample_weight.shape) != 2: 659 str(sample_weight.shape) + '. ' 663 if sample_weight is not None and len(sample_weight.shape) != 1: 665 str(sample_weight.shape) + '. ' 673 if sample_weight is not None: [all …]
|
D | training_distributed.py | 54 sample_weight=None, argument 77 sample_weight=sample_weight, 97 sample_weight=val_sample_weights, 140 sample_weight=None, argument 152 sample_weight=sample_weight,
|
D | training_test.py | 1228 sample_weight = np.ones((y_train.shape[0])) 1229 sample_weight[int_y_train == weighted_class] = weight 1237 sample_weight=sample_weight) 1244 sample_weight=sample_weight, 1250 sample_weight=sample_weight[:batch_size]) 1254 sample_weight=sample_weight[:batch_size]) 1295 sample_weight = np.ones((y_train.shape[0])) 1296 sample_weight[int_y_train == weighted_class] = weight 1310 temporal_sample_weight = np.reshape(sample_weight, (len(sample_weight), 1329 sample_weight=temporal_sample_weight) [all …]
|
D | training_dataset_test.py | 85 sample_weight = np.random.random((10,)) 94 sample_weight=sample_weight) 198 sample_weight = np.random.random((10,)) 207 sample_weight=sample_weight)
|
D | training_eager.py | 139 weighted_losses = loss_fn(targets[i], outs[i], sample_weight=weights) 150 output_loss = loss_fn(targets[i], outs[i], sample_weight=weights)
|
/external/tensorflow/tensorflow/python/keras/preprocessing/ |
D | image.py | 264 sample_weight=None, argument 284 sample_weight=sample_weight,
|
/external/tensorflow/tensorflow/contrib/seq2seq/python/ops/ |
D | loss.py | 160 def __call__(self, y_true, y_pred, sample_weight=None): argument 162 return sequence_loss(y_pred, y_true, sample_weight,
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.keras.models.-model.pbtxt | 170 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 178 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 274 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 286 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.-model.pbtxt | 170 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 178 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 274 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 286 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.-sequential.pbtxt | 175 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 183 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 291 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 303 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.layers.-linear-model.pbtxt | 175 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 183 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 279 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 291 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.models.-sequential.pbtxt | 175 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 183 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 291 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 303 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.keras.models.-model.pbtxt | 170 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 178 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 274 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 286 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.-model.pbtxt | 170 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 178 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 274 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 286 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.-sequential.pbtxt | 175 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 183 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 291 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 303 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
D | tensorflow.keras.models.-sequential.pbtxt | 175 …argspec: "args=[\'self\', \'x\', \'y\', \'batch_size\', \'verbose\', \'sample_weight\', \'steps\',… 183 …dation_split\', \'validation_data\', \'shuffle\', \'class_weight\', \'sample_weight\', \'initial_e… 291 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'reset_metrics\'], varargs=None, keywo… 303 …argspec: "args=[\'self\', \'x\', \'y\', \'sample_weight\', \'class_weight\', \'reset_metrics\'], v…
|
/external/tensorflow/tensorflow/contrib/tpu/python/tpu/ |
D | keras_support.py | 1484 sample_weight=None, argument 1555 validation_data, shuffle, class_weight, sample_weight, 1559 class_weight, sample_weight, initial_epoch, 1569 sample_weight=None, argument 1609 sample_weight, steps) 1616 sample_weight, initial_epoch, steps_per_epoch, argument 1635 sample_weight=sample_weight, 1967 sample_weight=val_sample_weight,
|