MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _compile_eagerly

Method _compile_eagerly

tensorflow/python/keras/engine/training.py:1562–1574  ·  view source on GitHub ↗
(self, metrics, weighted_metrics, sample_weight_mode)

Source from the content-addressed store, hash-verified

1560 return target_tensors
1561
1562 def _compile_eagerly(self, metrics, weighted_metrics, sample_weight_mode):
1563 # Prepare sample weight modes. List with the same length as model outputs.
1564 training_utils.prepare_sample_weight_modes(
1565 self._training_endpoints, sample_weight_mode)
1566 # Prepare sample weights.
1567 self._prepare_sample_weights()
1568 # Save all metric attributes per output of the model.
1569 self._cache_output_metric_attributes(metrics, weighted_metrics)
1570 self.total_loss = None
1571 # Set metric attributes on model.
1572 self._set_metric_attributes()
1573
1574 self._collected_trainable_weights = self._unique_trainable_weights
1575
1576 def _update_sample_weight_modes(self, sample_weights=None):
1577 """Updates sample weight modes based on training/eval inputs.

Callers 1

compileMethod · 0.95

Tested by

no test coverage detected