Closed simphide closed 4 years ago
Hi, if you are using a .npz extension for your log_file, then it wouldn't be a problem as y_train gets initializes in the block "if log_file.endswith('.npz'): ". But it seems you aren't. Also, since you are executing the code PCA without labels, the block "if label_file:" isn't executed and consequently y_train doesn't get initialized. Now since "print(y_train.sum(), y_test.sum())" is outside any of the blocks, it is executed normally and fails. I would rather recommend moving the print statement inside the "if label_file:" block. This would solve the problem.
When I try to run the demo script without labels it doesn't work.
Does anyone have an idea?