Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during initialization #40

Open
skarlosdeus opened this issue Aug 5, 2021 · 2 comments
Open

Error during initialization #40

skarlosdeus opened this issue Aug 5, 2021 · 2 comments

Comments

@skarlosdeus
Copy link

Hi all,

thanks for this great tool.
I am using SEAL that exploits DGCNN, and I am getting the next error during the initialization of your tool:

pytorch_DGCNN/main.py:175: RuntimeWarning: invalid value encountered in double_scalars
avg_loss = np.sum(total_loss, 0) / n_samples
Traceback (most recent call last):
File "Main.py", line 241, in
train_graphs, classifier, train_idxes, optimizer=optimizer, bsize=args.batch_size
File "/home/scarlos/Documents/git/SEAL/Python/../../pytorch_DGCNN/main.py", line 176, in loop_dataset
all_scores = torch.cat(all_scores).cpu().numpy()
NotImplementedError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors, or that you (the operator writer) forgot to register a fallback function. Available functions are [CPU, CUDA, QuantizedCPU, BackendSelect, Named, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, UNKNOWN_TENSOR_TYPE_ID, AutogradMLC, AutogradHPU, AutogradNestedTensor, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, Autocast, Batched, VmapMode].

Any idea?
Thanks.

@skarlosdeus
Copy link
Author

And this message when the proposed versions were used (Python 3.8.1 and Pytorch 1.4.0):

main.py:175: RuntimeWarning: invalid value encountered in double_scalars
avg_loss = np.sum(total_loss, 0) / n_samples
Traceback (most recent call last):
File "Main.py", line 240, in
avg_loss = loop_dataset(
File "/home/scarlos/Documents/git/SEAL/Python/../../pytorch_DGCNN/main.py", line 176, in loop_dataset
all_scores = torch.cat(all_scores).cpu().numpy()
RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CUDATensorId, CPUTensorId, VariableTensorId]

@muhanzhang
Copy link
Owner

Hi! Can you "import pdb" and add "pdb.set_trace()" before the line of "all_scores = torch.cat(all_scores).cpu().numpy()"? Then you can print the values of "all_scores" and see if they are empty, thus debugging thereby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants