Open az-justin opened 4 months ago
Hello @az-justin, you can use the code below after the test part, saving the indices of _, indices = similarity.topk(5)
.
np.save('./pic/y_pred/sub' + str(self.nSub) + '_pred.npy', indices.cpu().numpy())
Best~
Thanks soooo much @eeyhsong.
Hello @eeyhsong, I have some question as below when I have finished all steps according to Readme file. Now, i want to get the classification results as shown in Figure.3 in the paper, but when i run draw_pic/plot_topk.py , appearing this bug: Traceback (most recent call last): File "D:\NICE-EEG-main\draw_pic\plot_topk.py", line 9, in
y_pred = np.load('D:/NICE-EEG-main/pic/y_pred/sub%d_pred.npy' % sub_idx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\eeg\Lib\site-packages\numpy\lib\npyio.py", line 427, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'D:/NICE-EEG-main/pic/y_pred/sub1_pred.npy'
I do not find the y_pred file and sub1_pred.npy file after training, could you tell me how to get them?