Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
01bec4a3
Unverified
Commit
01bec4a3
authored
Jan 07, 2022
by
Jinjing Zhou
Committed by
GitHub
Jan 07, 2022
Browse files
Fix #3623 (#3628)
parent
b226fe01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
python/dgl/backend/tensorflow/tensor.py
python/dgl/backend/tensorflow/tensor.py
+4
-1
python/dgl/transform.py
python/dgl/transform.py
+1
-1
No files found.
python/dgl/backend/tensorflow/tensor.py
View file @
01bec4a3
...
...
@@ -320,7 +320,10 @@ def reshape(input, shape):
def
swapaxes
(
input
,
axis1
,
axis2
):
return
tf
.
transpose
(
input
,
perm
=
[
axis1
,
axis2
])
ndim
=
input
.
ndim
t
=
list
(
range
(
ndim
))
t
[
axis1
],
t
[
axis2
]
=
axis2
%
ndim
,
axis1
%
ndim
return
tf
.
transpose
(
input
,
perm
=
t
)
def
zeros
(
shape
,
dtype
,
ctx
):
...
...
python/dgl/transform.py
View file @
01bec4a3
...
...
@@ -254,7 +254,7 @@ def _knn_graph_blas(x, k, dist='euclidean'):
ctx
=
F
.
context
(
x
)
dist
=
pairwise_squared_distance
(
x
)
k_indices
=
F
.
argtopk
(
dist
,
k
,
2
,
descending
=
False
)
k_indices
=
F
.
astype
(
F
.
argtopk
(
dist
,
k
,
2
,
descending
=
False
)
,
F
.
int64
)
# index offset for each sample
offset
=
F
.
arange
(
0
,
n_samples
,
ctx
=
ctx
)
*
n_points
offset
=
F
.
unsqueeze
(
offset
,
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment