-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add Graph class #403
base: 0.2
Are you sure you want to change the base?
Add Graph class #403
Conversation
@FilippoOlivo I would avoid to write a graph solver, |
567f207
to
1867274
Compare
11a43ec
to
290641a
Compare
7ba1b32
to
238f665
Compare
cf42cf4
to
6e13f96
Compare
if isinstance(pos, torch.Tensor): | ||
pos = [pos] | ||
edge_index = [edge_index] | ||
distance = [pos_[edge_index_[0]] - pos_[edge_index_[1]] ** 2 for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edge_attr
is computed as the square of the distance, instead of the standard distance. Is this the desired behavior?
raise ValueError("The method must be 'radius' or 'knn.") | ||
if isinstance(pos, (torch.Tensor, LabelTensor)): | ||
if isinstance(pos, LabelTensor): | ||
pos = pos.tensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep pos
as a LabelTensor to simplify managing coordinates in multidimensional problems. For example, in a 2-dimensional problem, how would you access the x or y coordinates individually? @dario-coscia, can you think of any scenario where accessing coordinates separately might be useful?
@FilippoOlivo please remove from commit a862dc8 to f0ddee6, they should pertain to a different PR #433 . Only graph updates should be here |
@dario-coscia Done! Remove useless commits |
I would say green light on my side! |
@FilippoOlivo there is still the
|
This PR refers to the issue #400