Skip to content

Commit 6329455

Browse files
csferngtensorflow-copybara
authored andcommitted
Minor improvement in AdversarialRegularization.
PiperOrigin-RevId: 294286252
1 parent a3585be commit 6329455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neural_structured_learning/keras/adversarial_regularization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def compile(self,
503503
loss_weights=self._compile_arg_loss_weights,
504504
**kwargs)
505505

506-
if hasattr(self.base_model, 'output_names'):
506+
if getattr(self.base_model, 'output_names', None):
507507
# Organizes losses after the base model is fully compiled. The output
508508
# names from the base model is needed in case the loss (and/or
509509
# loss_weights) is specified in a dict().

0 commit comments

Comments
 (0)