-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
processing with karate datasets #13
base: master
Are you sure you want to change the base?
Conversation
I have trained a GCN to get the node embedings for karate dataset. |
Thanks, I’ll leave this open so people who are interested can make use of
it. To avoid clutter and to keep things simple, I prefer not to merge this
into master. But I’m sure others will find it useful:)
…On Wed 11. Jul 2018 at 04:04 Chaoqi Yang ***@***.***> wrote:
I have trained a GCN to get the node embedings for karate dataset.
The codes, revised model files and the result pic are listed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#13 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHAcYMgH9wzMzTGURtBN6e-Ep6MErJsyks5uFWtTgaJpZM4VKalm>
.
|
Hi,thanks for your sharing. This question point to this sentence: The complete error is as follow: looking forward to your reply |
Try running it on CPU only or put that tensor explicitly on GPU.
…On Sun, Jun 2, 2019 at 3:43 AM verds ***@***.***> wrote:
I have trained a GCN to get the node embedings for karate dataset.
The codes, revised model files and the result pic are listed.
Hi,thanks for your sharing.
I run your code to create two file: karate.cites and karate.content, it
success. However when I runed train_karate.py, it made this mistake:
RuntimeError: Expected object of type torch.cuda.LongTensor but found type
torch.LongTensor for argument #3 <#3>
'index'
This question point to this sentence:
loss = criterion(torch.index_select(output, 0,
indices),torch.LongTensor([0,1,2,3]))
(I try to change it to: loss = criterion(torch.index_select(output, 0,
indices),torch.cuda.LongTensor([0,1,2,3])) , but it doesn't work)
The complete error is as follow:
/home/wtu/anaconda3/envs/py/lib/python3.5/site-packages/torch/nn/functional.py:995:
UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.
warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.")
/home/wtu/project/pygcn_data/models2.py:22: UserWarning: Implicit
dimension choice for softmax has been deprecated. Change the call to
include dim=X as an argument.
return F.softmax(x)
Traceback (most recent call last):
File "/home/wtu/project/pygcn_data/train_karate.py", line 92, in
train(epoch)
File "/home/wtu/project/pygcn_data/train_karate.py", line 80, in train
loss = criterion(torch.index_select(output, 0,
indices),torch.LongTensor([0,1,2,3]))
RuntimeError: Expected object of type torch.cuda.LongTensor but found type
torch.LongTensor for argument #3 <#3>
'index'
looking forward to your reply
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#13?email_source=notifications&email_token=ABYBYYHMQWLHEKABMMBGWDDPYOP5XA5CNFSM4FJJVFTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXSZZA#issuecomment-498019556>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABYBYYAAWFVEXBLDZDZ67PDPYOP5XANCNFSM4FJJVFTA>
.
|
Thanks for your reply, I work it out. |
No description provided.