Skip to content

Commit 6f38dad

Browse files
committed
single model train script added as reference training
1 parent fff74a1 commit 6f38dad

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

single_model_learn.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import numpy as np
2+
from keras import datasets
3+
from keras import utils
4+
5+
import fed_learn
6+
7+
model = fed_learn.create_model((32, 32, 3), 10)
8+
9+
(x_train, y_train), (_, _) = datasets.cifar10.load_data()
10+
y_train = utils.to_categorical(y_train, len(np.unique(y_train)))
11+
12+
model.fit(x_train, y_train, batch_size=32, epochs=20, verbose=1)

0 commit comments

Comments
 (0)