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
Pytorch-Encoding
Commits
76eeba5d
Commit
76eeba5d
authored
May 12, 2017
by
Hang Zhang
Browse files
init
parents
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
test/test.py
test/test.py
+24
-0
No files found.
test/test.py
0 → 100644
View file @
76eeba5d
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
## Created by: Hang Zhang
## ECE Department, Rutgers University
## Email: zhang.hang@rutgers.edu
## Copyright (c) 2017
##
## This source code is licensed under the MIT-style license found in the
## LICENSE file in the root directory of this source tree
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import
torch
import
torch.nn
as
nn
from
torch.autograd
import
Variable
from
encoding
import
Aggregate
model
=
Aggregate
()
B
,
N
,
K
,
D
=
1
,
2
,
3
,
4
# TODO cpu test
A
=
Variable
(
torch
.
ones
(
B
,
N
,
K
).
cuda
())
R
=
Variable
(
torch
.
ones
(
B
,
N
,
K
,
D
).
cuda
())
E
=
model
(
A
,
R
)
print
(
E
)
Prev
1
2
Next
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