Home
last modified time | relevance | path

Searched refs:loss_fn (Results 1 – 25 of 28) sorted by relevance

12

/external/tensorflow/tensorflow/python/keras/benchmarks/keras_examples_benchmarks/
Dmnist_conv_custom_training_benchmark_test.py60 def compute_loss(self, targets, predictions, loss_fn, batch_size): argument
62 per_example_loss = loss_fn(targets, predictions)
67 def train_step(self, inputs, model, loss_fn, optimizer, batch_size): argument
83 loss = self.compute_loss(train_y, predictions, loss_fn, batch_size)
89 def distributed_train_step(self, batch_dataset, model, loss_fn, optimizer, argument
110 loss_fn,
120 loss_fn, argument
160 loss_fn, optimizer,
164 total_loss += self.train_step(batch_dataset, model, loss_fn,
176 loss_fn, argument
[all …]
/external/tensorflow/tensorflow/python/distribute/
Dsingle_loss_example.py42 def loss_fn(ctx, x): function
48 dataset_fn, loss_fn, optimizer, distribution, iterations_per_step)
68 def loss_fn(): function
73 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables)
75 return optimizer.minimize(loss_fn)
77 return optimizer.minimize(loss_fn())
105 def loss_fn(): function
116 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables)
119 return optimizer.minimize(loss_fn)
Dstep_fn.py88 def __init__(self, dataset_fn, loss_fn, optimizer, distribution, argument
91 self._loss_fn = loss_fn
Dcollective_all_reduce_strategy_test.py127 def loss_fn(x): function
135 loss = loss_fn(x)
Dparameter_server_strategy_test.py456 def loss_fn(x): function
464 loss = loss_fn(x)
/external/tensorflow/tensorflow/python/keras/distribute/
Dtest_example.py45 def loss_fn(): function
50 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables)
52 return optimizer.minimize(loss_fn)
54 return optimizer.minimize(loss_fn())
82 def loss_fn(): function
93 return optimizer.minimize(loss_fn, lambda: layer.trainable_variables)
96 return optimizer.minimize(loss_fn)
Dminimize_loss_test.py344 def loss_fn(): function
356 return optimizer.minimize(loss_fn, [w])
359 return optimizer.minimize(loss_fn)
361 return optimizer.minimize(loss_fn())
439 def loss_fn(): function
445 loss_fn, lambda: layer.trainable_variables)
447 train_op = optimizer.minimize(loss_fn)
448 loss = loss_fn()
Dkeras_optimizer_v2_test.py64 def loss_fn(): function
68 train_op = optimizer.minimize(loss_fn, var_list=[var])
Dmirrored_strategy_test.py74 def loss_fn(ctx): function
78 gradients_fn = backprop.implicit_grad(loss_fn)
/external/tensorflow/tensorflow/python/keras/engine/
Dtraining_eager_v1.py36 def _eager_loss_fn(outputs, targets, loss_fn, output_name): argument
38 loss = loss_fn(targets, outputs)
149 loss_fn for loss_fn in model.loss_functions if loss_fn is not None
161 for i, loss_fn in enumerate(loss_fns):
178 if hasattr(loss_fn, 'reduction'):
179 per_sample_losses = loss_fn.call(targets[i], outs[i])
184 loss_reduction = loss_fn.reduction
200 output_loss = loss_fn(targets[i], outs[i], sample_weight=weights)
Dtraining_v1.py1591 loss_fn = endpoint.loss_fn
1609 if hasattr(loss_fn, 'reduction'):
1610 per_sample_losses = loss_fn.call(y_true, y_pred)
1615 loss_reduction = loss_fn.reduction
1631 output_loss = loss_fn(y_true, y_pred, sample_weight=sample_weight)
2719 e.loss_fn
2889 loss_fn, argument
2915 self._loss_fn = loss_fn
2935 def loss_fn(self): member in _TrainingEndpoint
2991 self.loss_fn, K.dtype(self.output))
[all …]
Dtraining_utils_v1.py912 metric, output_shape=output_shapes[i], loss_fn=loss_fns[i])
1134 def get_metric_function(metric, output_shape=None, loss_fn=None): argument
1150 isinstance(loss_fn, losses.SparseCategoricalCrossentropy) or
1151 (isinstance(loss_fn, losses.LossFunctionWrapper) and
1152 loss_fn.fn == losses.sparse_categorical_crossentropy))
1155 isinstance(loss_fn, losses.BinaryCrossentropy) or
1156 (isinstance(loss_fn, losses.LossFunctionWrapper) and
1157 loss_fn.fn == losses.binary_crossentropy))
1221 loss_fn = losses.get(loss)
1227 loss_fn,
[all …]
/external/tensorflow/tensorflow/python/keras/saving/saved_model/
Dsave_impl.py105 for loss_fn in all_losses:
106 if loss_fn in keras_loss_cache:
107 wrapped_loss_functions.append(keras_loss_cache[loss_fn])
109 wrapped_loss = _wrap_unconditional_loss(loss_fn, len(keras_loss_cache))
110 keras_loss_cache[loss_fn] = wrapped_loss
611 def _wrap_unconditional_loss(loss_fn, index): argument
614 fn = loss_fn.args[0] if isinstance(loss_fn, functools.partial) else loss_fn
/external/tensorflow/tensorflow/python/keras/mixed_precision/
Dkeras_test.py579 def loss_fn(y_true, y_pred): function
593 loss=loss_fn,
611 {'MultiplyLayer': mp_test_util.MultiplyLayer, 'loss_fn': loss_fn}):
681 def loss_fn(y_true, y_pred): function
690 loss=loss_fn,
759 def loss_fn(y_true, y_pred): function
769 loss=loss_fn,
862 def loss_fn(y_true, y_pred): function
868 loss=loss_fn,
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.estimator.-multi-class-head.pbtxt20 …lasses\', \'weight_column\', \'label_vocabulary\', \'loss_reduction\', \'loss_fn\', \'name\'], var…
Dtensorflow.estimator.-regression-head.pbtxt20 …argspec: "args=[\'self\', \'label_dimension\', \'weight_column\', \'loss_reduction\', \'loss_fn\',…
Dtensorflow.estimator.-multi-label-head.pbtxt20 …ht_column\', \'thresholds\', \'label_vocabulary\', \'loss_reduction\', \'loss_fn\', \'classes_for_…
Dtensorflow.estimator.-binary-class-head.pbtxt20 …ht_column\', \'thresholds\', \'label_vocabulary\', \'loss_reduction\', \'loss_fn\', \'name\'], var…
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.estimator.-binary-class-head.pbtxt20 …ht_column\', \'thresholds\', \'label_vocabulary\', \'loss_reduction\', \'loss_fn\', \'name\'], var…
Dtensorflow.estimator.-multi-class-head.pbtxt20 …lasses\', \'weight_column\', \'label_vocabulary\', \'loss_reduction\', \'loss_fn\', \'name\'], var…
Dtensorflow.estimator.-multi-label-head.pbtxt20 …ht_column\', \'thresholds\', \'label_vocabulary\', \'loss_reduction\', \'loss_fn\', \'classes_for_…
Dtensorflow.estimator.-regression-head.pbtxt20 …argspec: "args=[\'self\', \'label_dimension\', \'weight_column\', \'loss_reduction\', \'loss_fn\',…
/external/tensorflow/tensorflow/python/keras/
Dlosses.py1224 def _ragged_tensor_apply_loss(loss_fn, y_true, y_pred): argument
1260 lambda: loss_fn(*_convert_to_dense(inputs)), lambda: loss_fn(*inputs))
1262 return loss_fn(*inputs)
Dlosses_test.py191 loss_fn = losses.get('mse')
192 mse_obj = losses.LossFunctionWrapper(loss_fn, name=loss_fn.__name__)
212 def loss_fn(y_true, y_pred): function
219 mse_obj = losses.LossFunctionWrapper(loss_fn)
1793 def loss_fn(y_true, y_pred): function
1797 loss = loss_fn(y_true, y_pred)
/external/tensorflow/tensorflow/python/keras/optimizer_v2/
Dlearning_rate_schedule_test.py128 def loss_fn(): function
137 loss = loss_fn()

12