Thank you Tiiiger for making up the changes as the reference to the closed issue Memory Error #6, but it still not working for me, I am posting the error message here.
Traceback (most recent call last):
File "C:\Users\Desktop\NewProjects\SGC\downstream\TextSGC\train.py", line 105, in
adj_dense = sparse_to_torch_dense(sp_adj, device='cpu')
File "C:\Users\Desktop\NewProjects\SGC\downstream\TextSGC\utils.py", line 127, in sparse_to_torch_dense
dense = sparse.todense().astype(np.float32)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\base.py", line 849, in todense
return np.asmatrix(self.toarray(order=order, out=out))
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\coo.py", line 317, in toarray
B = self._process_toarray_args(order, out)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\base.py", line 1187, in _process_toarray_args
return np.zeros(self.shape, dtype=self.dtype, order=order)
MemoryError
Thank you Tiiiger for making up the changes as the reference to the closed issue Memory Error #6, but it still not working for me, I am posting the error message here.
Traceback (most recent call last): File "C:\Users\Desktop\NewProjects\SGC\downstream\TextSGC\train.py", line 105, in adj_dense = sparse_to_torch_dense(sp_adj, device='cpu') File "C:\Users\Desktop\NewProjects\SGC\downstream\TextSGC\utils.py", line 127, in sparse_to_torch_dense dense = sparse.todense().astype(np.float32) File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\base.py", line 849, in todense return np.asmatrix(self.toarray(order=order, out=out)) File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\coo.py", line 317, in toarray B = self._process_toarray_args(order, out) File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\base.py", line 1187, in _process_toarray_args return np.zeros(self.shape, dtype=self.dtype, order=order) MemoryError