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
d2901654
Commit
d2901654
authored
Nov 09, 2016
by
soumith
Browse files
py3 compat
parent
2c277d62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
requirements.txt
requirements.txt
+1
-0
torchvision/datasets/lsun.py
torchvision/datasets/lsun.py
+2
-2
No files found.
requirements.txt
View file @
d2901654
pillow
pillow
six
torchvision/datasets/lsun.py
View file @
d2901654
...
@@ -2,7 +2,7 @@ import torch.utils.data as data
...
@@ -2,7 +2,7 @@ import torch.utils.data as data
from
PIL
import
Image
from
PIL
import
Image
import
os
import
os
import
os.path
import
os.path
import
StringIO
import
six
import
string
import
string
import
sys
import
sys
if
sys
.
version_info
[
0
]
==
2
:
if
sys
.
version_info
[
0
]
==
2
:
...
@@ -34,7 +34,7 @@ class LSUNClass(data.Dataset):
...
@@ -34,7 +34,7 @@ class LSUNClass(data.Dataset):
with
env
.
begin
(
write
=
False
)
as
txn
:
with
env
.
begin
(
write
=
False
)
as
txn
:
imgbuf
=
txn
.
get
(
self
.
keys
[
index
])
imgbuf
=
txn
.
get
(
self
.
keys
[
index
])
buf
=
StringIO
.
String
IO
()
buf
=
six
.
Bytes
IO
()
buf
.
write
(
imgbuf
)
buf
.
write
(
imgbuf
)
buf
.
seek
(
0
)
buf
.
seek
(
0
)
img
=
Image
.
open
(
buf
).
convert
(
'RGB'
)
img
=
Image
.
open
(
buf
).
convert
(
'RGB'
)
...
...
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