Closed whu-zhigao closed 2 years ago
Hi, the code shown in your snippet is different from what is provided in the library. Please see nocd/data.py
for the load_dataset
function.
when we run the .ipynb file .At what location the result gets stored .
I'm sorry, I don't think I understand the question. Can you please clarify?
The results in the Jupyter notebook (conductance computation, visualization of the sorted adjacency matrix) are not saved to disk, they are only shown in the notebook.
i am saying i want the resultant communities to be stored in the output but i dont know where to execute that code either, i am a beginner of python but my project is somewhat related to this so i need to run this code and compare the output file with other outputs given by other methods. can you please help me ..moreover after installing every said module i am getting cuda error
The community assignments are stored in the binary matrix Z_pred
(shape num_nodes x num_communities
). Z_pred[i, j] == 1
means that node i
is assigned to community j
.
You can save the result to disk with np.save("communities.npy", Z_pred)
and then load it in a different file with Z_pred = np.load("communities.npy")
.
I cannot help with the CUDA error, unfortunately, you should try googling / using StackOverflow.
thankyou . i executed this code via google colab but it seems like this "true" error cannot b solved .
Sorry, I cannot help you with this, unless you post the error message + a code snippet that reproduces it.
AFter this i somehow managed to make a change via VSCODE but again it comes up with the error saying "TORCH NOT COMPILED WITH CUDA ENABLED"
Here it is
can you please help me in executing this code . I am a student and need to run this CODE as soon as possible before my deadline.
Sorry, I don't really have time to help anyone with coursework. TORCH NOT COMPILED WITH CUDA ENABLED
means that you don't have a GPU, and running this code requires having a GPU on your machine. Please use Google / StackOverflow to look for answers.
Thankyou
Hi, @shchur Would you please let me know the data format of the input graphs? I convert several graphs from mtx to npz, but the following errors occurred. ' Traceback (most recent call last): File "example.py", line 14, in
G = nocd.utils.load_dataset(path_to_dataset)
File "/home/community/nocd/nocd/utils.py", line 49, in load_dataset
A = sp.csr_matrix((loader['adj_data'], loader['adj_indices'],
KeyError: 'adj_data'
'