Home
last modified time | relevance | path

Searched refs:sample_weight (Results 1 – 25 of 135) sorted by relevance

123456

/external/tensorflow/tensorflow/python/keras/utils/
Dlosses_utils.py60 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 …]
Dmetrics_utils.py218 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/
Dlosses_test.py59 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 …]
Dmetrics.py277 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 …]
Dmetrics_test.py81 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 …]
Dmetrics_confusion_matrix_test.py73 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 …]
Dmetrics_correctness_test.py140 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/
Dtraining.py542 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 …]
Dtraining_utils.py400 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 …]
Dtraining_distributed.py54 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,
Dtraining_test.py1228 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 …]
Dtraining_dataset_test.py85 sample_weight = np.random.random((10,))
94 sample_weight=sample_weight)
198 sample_weight = np.random.random((10,))
207 sample_weight=sample_weight)
Dtraining_eager.py139 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/
Dimage.py264 sample_weight=None, argument
284 sample_weight=sample_weight,
/external/tensorflow/tensorflow/contrib/seq2seq/python/ops/
Dloss.py160 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/
Dtensorflow.keras.models.-model.pbtxt170 …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…
Dtensorflow.keras.-model.pbtxt170 …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…
Dtensorflow.keras.-sequential.pbtxt175 …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…
Dtensorflow.keras.layers.-linear-model.pbtxt175 …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…
Dtensorflow.keras.models.-sequential.pbtxt175 …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/
Dtensorflow.keras.models.-model.pbtxt170 …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…
Dtensorflow.keras.-model.pbtxt170 …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…
Dtensorflow.keras.-sequential.pbtxt175 …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…
Dtensorflow.keras.models.-sequential.pbtxt175 …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/
Dkeras_support.py1484 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,

123456