pfnet / PaintsChainer

line drawing colorization using chainer
https://paintschainer.preferred.tech/
MIT License
3.77k stars 557 forks source link

Latest version returns server error: "All arrays must have same shape except the axis to concatenate" #82

Closed liamjones closed 7 years ago

liamjones commented 7 years ago

I'm updating https://github.com/liamjones/PaintsChainer-Docker to pick up recent changes and I'm getting processing errors.

I've bisected the new commits and it seems like something broke in commit e240af8 (looks like this commit is related to issue #53? Thanks for looking at it :+1:).

Stack trace:

load:./images/line/AYS98VK0YU0GB18LR9XD2FF3A0PS8963.png True False
(1, 4, 159, 512)
----------------------------------------
Exception happened during processing of request from ('172.17.0.1', 47888)
Traceback (most recent call last):
  File "/opt/conda/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/opt/conda/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/opt/conda/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "server.py", line 69, in __init__
    self, req, client_addr, server)
  File "/opt/conda/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/opt/conda/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/opt/conda/lib/python3.5/http/server.py", line 410, in handle_one_request
    method()
  File "server.py", line 131, in do_POST
    painter.colorize(id_str, blur=blur)
  File "./cgi-bin/paint_x2_unet/cgi_exe.py", line 151, in colorize
    y = self.cnn.calc(Variable(x, volatile='on'), test=True)
  File "./cgi-bin/paint_x2_unet/unet.py", line 78, in calc
    d6 = F.relu(self.bnd6(self.dc6(F.concat([e6, d7])), test=test), use_cudnn)
  File "/opt/conda/lib/python3.5/site-packages/chainer/functions/array/concat.py", line 65, in concat
    return Concat(axis=axis)(*xs)
  File "/opt/conda/lib/python3.5/site-packages/chainer/function.py", line 199, in __call__
    outputs = self.forward(in_data)
  File "/opt/conda/lib/python3.5/site-packages/chainer/functions/array/concat.py", line 43, in forward
    return xp.concatenate(xs, axis=self.axis),
  File "/opt/conda/lib/python3.5/site-packages/cupy/manipulation/join.py", line 71, in concatenate
    'All arrays must have same shape except the axis to '
----------------------------------------
ValueError: All arrays must have same shape except the axis to concatenate
taizan commented 7 years ago

Oh it seems to be a bug... sorry

taizan commented 7 years ago

I think it is fixed

liamjones commented 7 years ago

It is, thank you! :smile: