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
vision
Commits
17cebddd
Commit
17cebddd
authored
Nov 16, 2016
by
soumith
Browse files
fix bug in lsun
parent
0a04aaa4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
torchvision/datasets/lsun.py
torchvision/datasets/lsun.py
+3
-3
No files found.
torchvision/datasets/lsun.py
View file @
17cebddd
...
...
@@ -87,7 +87,7 @@ class LSUN(data.Dataset):
# for each class, create an LSUNClassDataset
self
.
dbs
=
[]
for
c
in
self
.
classes
:
self
.
dbs
.
append
(
LSUNClass
Dataset
(
self
.
dbs
.
append
(
LSUNClass
(
db_path
=
db_path
+
'/'
+
c
+
'_lmdb'
,
transform
=
transform
))
...
...
@@ -124,9 +124,9 @@ class LSUN(data.Dataset):
return
self
.
__class__
.
__name__
+
' ('
+
self
.
db_path
+
')'
if
__name__
==
'__main__'
:
#lsun = LSUNClass
Dataset
(db_path='/home/soumith/local/lsun/train/bedroom_train_lmdb')
#lsun = LSUNClass(db_path='/home/soumith/local/lsun/train/bedroom_train_lmdb')
#a = lsun[0]
lsun
=
LSUN
Dataset
(
db_path
=
'/home/soumith/local/lsun/train'
,
lsun
=
LSUN
(
db_path
=
'/home/soumith/local/lsun/train'
,
classes
=
[
'bedroom_train'
,
'church_outdoor_train'
])
print
(
lsun
.
classes
)
print
(
lsun
.
dbs
)
...
...
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