Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Max Ehrlich
cdcnn
Commits
f5792788
Verified
Commit
f5792788
authored
Dec 04, 2018
by
Max Ehrlich
Browse files
Fix decoding bug
parent
35b472e4
Changes
1
Show whitespace changes
Inline
Side-by-side
jpeg_codec/codec.py
View file @
f5792788
...
...
@@ -25,8 +25,8 @@ def encode(batch, block_size=(8, 8), device=None):
def
decode
(
batch
,
device
=
None
):
block_size
=
np
.
sqrt
(
batch
.
shape
[
4
])
image_size
=
(
batch
.
shape
[
2
]
*
block_size
,
batch
.
shape
[
3
]
*
block_size
)
block_size
=
int
(
np
.
sqrt
(
batch
.
shape
[
4
])
)
image_size
=
(
int
(
batch
.
shape
[
2
]
*
block_size
)
,
int
(
batch
.
shape
[
3
]
*
block_size
)
)
_
,
J_i
=
codec
(
image_size
,
(
block_size
,
block_size
))
...
...
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