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
cccc2339
Commit
cccc2339
authored
Dec 01, 2018
by
Haibin Lin
Committed by
Minjie Wang
Dec 01, 2018
Browse files
[Dataset] update s3 links (#209)
parent
e02acc4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
python/dgl/data/citation_graph.py
python/dgl/data/citation_graph.py
+3
-3
python/dgl/data/tree.py
python/dgl/data/tree.py
+1
-1
tutorials/models/5_dgmg.py
tutorials/models/5_dgmg.py
+1
-1
No files found.
python/dgl/data/citation_graph.py
View file @
cccc2339
...
@@ -15,9 +15,9 @@ import os, sys
...
@@ -15,9 +15,9 @@ import os, sys
from
.utils
import
download
,
extract_archive
,
get_download_dir
from
.utils
import
download
,
extract_archive
,
get_download_dir
_urls
=
{
_urls
=
{
'cora'
:
'https://s3.amazonaws.com/dgl
-data
/dataset/cora.zip'
,
'cora'
:
'https://s3.
us-east-2.
amazonaws.com/dgl
.ai
/dataset/cora.zip'
,
'citeseer'
:
'https://s3.amazonaws.com/dgl
-data
/dataset/citeseer.zip'
,
'citeseer'
:
'https://s3.
us-east-2.
amazonaws.com/dgl
.ai
/dataset/citeseer.zip'
,
'pubmed'
:
'https://s3.amazonaws.com/dgl
-data
/dataset/pubmed.zip'
,
'pubmed'
:
'https://s3.
us-east-2.
amazonaws.com/dgl
.ai
/dataset/pubmed.zip'
,
}
}
class
CitationGraphDataset
(
object
):
class
CitationGraphDataset
(
object
):
...
...
python/dgl/data/tree.py
View file @
cccc2339
...
@@ -17,7 +17,7 @@ import dgl.backend as F
...
@@ -17,7 +17,7 @@ import dgl.backend as F
from
dgl.data.utils
import
download
,
extract_archive
,
get_download_dir
from
dgl.data.utils
import
download
,
extract_archive
,
get_download_dir
_urls
=
{
_urls
=
{
'sst'
:
'https://s3.amazonaws.com/dgl
-data
/dataset/sst.zip'
,
'sst'
:
'https://s3.
us-east-2.
amazonaws.com/dgl
.ai
/dataset/sst.zip'
,
}
}
SSTBatch
=
namedtuple
(
'SSTBatch'
,
[
'graph'
,
'mask'
,
'wordid'
,
'label'
])
SSTBatch
=
namedtuple
(
'SSTBatch'
,
[
'graph'
,
'mask'
,
'wordid'
,
'label'
])
...
...
tutorials/models/5_dgmg.py
View file @
cccc2339
...
@@ -713,7 +713,7 @@ class DGMG(DGMGSkeleton):
...
@@ -713,7 +713,7 @@ class DGMG(DGMGSkeleton):
import
torch.utils.model_zoo
as
model_zoo
import
torch.utils.model_zoo
as
model_zoo
# Download a pre-trained model state dict for generating cycles with 10-20 nodes.
# Download a pre-trained model state dict for generating cycles with 10-20 nodes.
state_dict
=
model_zoo
.
load_url
(
'https://s3.amazonaws.com/dgl
-data
/model/dgmg_cycles-5a0c40be.pth'
)
state_dict
=
model_zoo
.
load_url
(
'https://s3.
us-east-2.
amazonaws.com/dgl
.ai
/model/dgmg_cycles-5a0c40be.pth'
)
model
=
DGMG
(
v_max
=
20
,
node_hidden_size
=
16
,
num_prop_rounds
=
2
)
model
=
DGMG
(
v_max
=
20
,
node_hidden_size
=
16
,
num_prop_rounds
=
2
)
model
.
load_state_dict
(
state_dict
)
model
.
load_state_dict
(
state_dict
)
model
.
eval
()
model
.
eval
()
...
...
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