MenghaoGuo / AutoDeeplab

Pytorch Implementation the paper Auto-DeepLab Hierarchical Neural Architecture Search for Semantic Image Segmentation
https://arxiv.org/abs/1901.02985
410 stars 97 forks source link

TypeError: 'NoneType' object is not callable #56

Open liu-ca opened 5 years ago

liu-ca commented 5 years ago

When I run this code, image

skx6 commented 4 years ago

The same problem! Have you solved yet?

skx6 commented 4 years ago

I finally solved the problem by changing codes in "model_search.py":

    for i in range(self._steps):
        for j in range(2 + i):
            stride = 1
            if C_prev_prev == -1 and j == 0:
                op = None
            else:
                op = MixedOp(self.C_out, stride)
            self._ops.append(op)
GuHuangAI commented 4 years ago

I finally solved the problem by changing codes in "model_search.py": for i in range(self._steps): for j in range(2 + i): stride = 1 if C_prev_prev == -1 and j == 0: op = None else: op = MixedOp(self.C_out, stride) self._ops.append(op)

it's useful, and then i get a new issue:RuntimeError: CUDA out of memory. i run on pascal dataset, could you help me?

tuanhui-li commented 4 years ago

I finally solved the problem by changing codes in "model_search.py": for i in range(self._steps): for j in range(2 + i): stride = 1 if C_prev_prev == -1 and j == 0: op = None else: op = MixedOp(self.C_out, stride) self._ops.append(op)

it's useful, and then i get a new issue:RuntimeError: CUDA out of memory. i run on pascal dataset, could you help me? Hello ! Have you solved yet?

GuHuangAI commented 4 years ago

the best way is to use a GPU that has enough memory.

------------------ 原始邮件 ------------------ 发件人: "tuanhui-li"<notifications@github.com>; 发送时间: 2020年3月27日(星期五) 下午4:33 收件人: "MenghaoGuo/AutoDeeplab"<AutoDeeplab@noreply.github.com>; 抄送: "醉生 s& 梦 死"<1654592024@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [MenghaoGuo/AutoDeeplab] TypeError: 'NoneType' object is not callable (#56)

I finally solved the problem by changing codes in "model_search.py": for i in range(self._steps): for j in range(2 + i): stride = 1 if C_prev_prev == -1 and j == 0: op = None else: op = MixedOp(self.C_out, stride) self._ops.append(op)

it's useful, and then i get a new issue:RuntimeError: CUDA out of memory. i run on pascal dataset, could you help me? Hello ! Have you solved yet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

NdaAzr commented 4 years ago

I am getting the same error for my custom dataset. has anyone solved this issue? @SongKaixiang how you did solve the problem? I used your snippet, and I got this error.

File "C:\AutoDeeplab-master\model_search.py", line 71, in forward
    s = sum(self._ops[offset+j](h, weights[offset+j]) for j, h in enumerate(states) if h is not None)

  File "C:\AutoDeeplab-master\model_search.py", line 71, in <genexpr>
    s = sum(self._ops[offset+j](h, weights[offset+j]) for j, h in enumerate(states) if h is not None)

  File "C:\Users\user\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 138, in __getitem__
    return self._modules[self._get_abs_string_index(idx)]

  File "C:\Users\user\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 129, in _get_abs_string_index
    raise IndexError('index {} is out of range'.format(idx))

IndexError: index 15 is out of range
rrryan2016 commented 4 years ago

the best way is to use a GPU that has enough memory. ------------------ 原始邮件 ------------------ 发件人: "tuanhui-li"<notifications@github.com>; 发送时间: 2020年3月27日(星期五) 下午4:33 收件人: "MenghaoGuo/AutoDeeplab"<AutoDeeplab@noreply.github.com>; 抄送: "醉生 s& 梦 死"<1654592024@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [MenghaoGuo/AutoDeeplab] TypeError: 'NoneType' object is not callable (#56) I finally solved the problem by changing codes in "model_search.py": for i in range(self._steps): for j in range(2 + i): stride = 1 if C_prev_prev == -1 and j == 0: op = None else: op = MixedOp(self.C_out, stride) self._ops.append(op) it's useful, and then i get a new issue:RuntimeError: CUDA out of memory. i run on pascal dataset, could you help me? Hello ! Have you solved yet? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Heyyyy! Which gpu did you use to run it? I used 4 TITAN X (pascal), each memory is 11.2GB, but still "CUDA out of memory".

I doubt it could be some mistake in distributed computing, what I mainly did in parallel is self.model = torch.nn.DataParallel(self.model, device_ids=[0, 1, 2, 3])

rogressing commented 1 year ago

I finally solved the problem by changing codes in "model_search.py": for i in range(self._steps): for j in range(2 + i): stride = 1 if C_prev_prev == -1 and j == 0: op = None else: op = MixedOp(self.C_out, stride) self._ops.append(op)

it's useful, and then i get a new issue:RuntimeError: CUDA out of memory. i run on pascal dataset, could you help me? Hello, I followed your method, but still prompted a problem, I would like to ask if I can see how your file is modified, can you have a screenshot of the changes to view it, if you can reply to me, it would be very helpful to me.Thank you !

Randylcy commented 1 year ago

您的邮件我已收到。我尽快查看并回复