tsurumeso / waifu2x-chainer

Chainer implementation of waifu2x
MIT License
165 stars 54 forks source link

MemoryError #1

Closed NekoTony closed 6 years ago

NekoTony commented 7 years ago

Level 3 denoising... Traceback (most recent call last): File "waifu2x.py", line 133, in dst = denoise_image(dst, models['noise'], args) File "waifu2x.py", line 21, in denoise_image dst = reconstruct.image(src, model, cfg.block_size, cfg.batch_size) File "/home/lib/reconstruct.py", line 137, in image dst = blockwise(src, model, block_size, batch_size) File "/home/lib/reconstruct.py", line 53, in blockwise batch_y = model(batch_x) File "/home/lib/srcnn.py", line 26, in call h = F.leaky_relu(self.conv3(h), 0.1) File "/usr/local/lib/python3.5/dist-packages/chainer/links/connection/convolution_2d.py", line 154, in call x, self.W, self.b, self.stride, self.pad) File "/usr/local/lib/python3.5/dist-packages/chainer/functions/connection/convolution_2d.py", line 439, in convolution_2d return func(x, W, b) File "/usr/local/lib/python3.5/dist-packages/chainer/function.py", line 200, in call outputs = self.forward(in_data) File "/usr/local/lib/python3.5/dist-packages/chainer/function.py", line 329, in forward return self.forward_cpu(inputs) File "/usr/local/lib/python3.5/dist-packages/chainer/functions/connection/convolution_2d.py", line 87, in forward_cpu cover_all=self.cover_all) File "/usr/local/lib/python3.5/dist-packages/chainer/utils/conv.py", line 33, in im2col_cpu col = numpy.ndarray((n, c, kh, kw, out_h, out_w), dtype=img.dtype) MemoryError

tsurumeso commented 6 years ago

MemoryError occurs when there is not enough memory. So you should reduce memory usage to set --block_size or --batch_size. Maybe setting these values to half of default (--block_size 32 or --batch_size 4) will not cause MemoryError.

NekoTony commented 6 years ago

lib not a module...

tsurumeso commented 6 years ago

What do you mean...? Please give me the details.

NekoTony commented 6 years ago

Import error lib not found

tsurumeso commented 6 years ago

Looking at your first comment seems to be successful to import lib. I could not reproduce the problem. It may be better to reinstall waifu2x-chainer.