Skip to content

Commit 8be3a3b

Browse files
committed
fix: black format
1 parent b37c390 commit 8be3a3b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/vision/adamatch.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Title: Semi-supervision and domain adaptation with AdaMatch
33
Author: [Sayak Paul](https://twitter.com/RisingSayak)
44
Date created: 2021/06/19
5-
Last modified: 2026/03/11
5+
Last modified: 2026/03/12
66
Description: Unifying semi-supervised learning and unsupervised domain adaptation with AdaMatch.
77
Accelerator: GPU
88
Converted to Keras 3 by: [Maitry Sinha](https://github.com/maitry63)
@@ -122,6 +122,7 @@ def load_svhn_data():
122122
## Data loading utilities
123123
"""
124124

125+
125126
class AdaMatchDataset(keras.utils.PyDataset):
126127
def __init__(self, source_x, source_y, target_x, target_size=32, **kwargs):
127128
"""
@@ -242,7 +243,7 @@ def __init__(self, model, total_steps, tau=0.9):
242243

243244
rand_aug = layers.RandAugment(value_range=(0, 255), num_ops=2, factor=0.5)
244245
self.strong_aug = rand_aug
245-
246+
246247
@property
247248
def metrics(self):
248249
return [self.loss_tracker]
@@ -459,7 +460,9 @@ def get_network():
459460
x = layers.Activation("relu")(x)
460461
x = layers.GlobalAveragePooling2D()(x)
461462

462-
outputs = layers.Dense(10, kernel_regularizer=keras.regularizers.l2(WEIGHT_DECAY))(x)
463+
outputs = layers.Dense(10, kernel_regularizer=keras.regularizers.l2(WEIGHT_DECAY))(
464+
x
465+
)
463466
return keras.Model(inputs, outputs)
464467

465468

0 commit comments

Comments
 (0)