-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Description
If I understand correctly, the model is evaluated on the same data that it's trained on. Doesn't this lead to a wrong evaluation?
Load data
Line 290 in 2438070
x, y = load_data(args.dataset) |
Lines 94 to 103 in 2438070
def load_mnist(): | |
# the data, shuffled and split between train and test sets | |
from keras.datasets import mnist | |
(x_train, y_train), (x_test, y_test) = mnist.load_data() | |
x = np.concatenate((x_train, x_test)) | |
y = np.concatenate((y_train, y_test)) | |
x = x.reshape((x.shape[0], -1)) | |
x = np.divide(x, 255.) | |
print('MNIST samples', x.shape) | |
return x, y |
Evaluate
Lines 333 to 335 in 2438070
y_pred = dec.fit(x, y=y, tol=args.tol, maxiter=args.maxiter, batch_size=args.batch_size, | |
update_interval=update_interval, save_dir=args.save_dir) | |
print('acc:', metrics.acc(y, y_pred)) |
Shouldn't x_train and y_trained used to pretrain and fit, and then x_test and y_test used to evaluate the model?
Metadata
Metadata
Assignees
Labels
No labels