projects
/
culture.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
47fcc6b
)
Update.
author
François Fleuret
<francois@fleuret.org>
Sat, 6 Jul 2024 07:05:00 +0000
(10:05 +0300)
committer
François Fleuret
<francois@fleuret.org>
Sat, 6 Jul 2024 07:05:00 +0000
(10:05 +0300)
grids.py
patch
|
blob
|
history
diff --git
a/grids.py
b/grids.py
index
b40d532
..
247c146
100755
(executable)
--- a/
grids.py
+++ b/
grids.py
@@
-65,19
+65,6
@@
class Grids(problem.Problem):
return x
return x
- def frame2img_(self, x, scale=15):
- x = x.reshape(x.size(0), self.height, -1)
- x = self.colors[x].permute(0, 3, 1, 2)
- s = x.shape
- x = x[:, :, :, None, :, None].expand(-1, -1, -1, scale, -1, scale)
- x = x.reshape(s[0], s[1], s[2] * scale, s[3] * scale)
-
- x[:, :, :, torch.arange(0, x.size(3), scale)] = 0
- x[:, :, torch.arange(0, x.size(2), scale), :] = 0
- x = x[:, :, 1:, 1:]
-
- return x
-
def save_image(
self,
result_dir,
def save_image(
self,
result_dir,