PixelLink-with-pytorch icon indicating copy to clipboard operation
PixelLink-with-pytorch copied to clipboard

iteration 12: pixel_loss: nan, link_loss: nan, total loss: nan, time: 3.7550010681152344

Open ligaoyuan-potato opened this issue 5 years ago • 4 comments

我改了数据加载这里,看了下没啥问题,为啥会爆炸呢?请指教一下 reade_label() with codecs.open(os.path.join(dir, self.labels_name[i-1]), encoding="utf-8_sig") as file: data = file.readlines() temp_str = '' for l in data: temp_str += l.strip('\r\n') temp_json = json.loads(temp_str) tmp = {} tmp["coor"] = [] tmp["content"] = [] tmp["ignore"] = [] tmp["area"] = [] for line in temp_json["shapes"]: tmp["content"].append(line["label"]) if line["label"] == "###": tmp["ignore"].append(True) else: tmp["ignore"].append(False) coor = [] if len(line["points"]) != 4: print(os.path.join(dir, self.labels_name[i - 1])) print(line["points"]) for n in line["points"]: coor.append(int(n[0])) coor.append(int(n[1])) tmp["coor"].append(coor) coor = np.array(coor).reshape([4, 2]) tmp["area"].append(cv2.contourArea(coor))

            # for line in data:
            #     content = line.split(",")
            #     coor = [int(n) for n in content[:8]]
            #
            #     content[8] = content[8].strip("\r\n")
            #     tmp["content"].append(content[8])
            #     if content[8] == "###":
            #         tmp["ignore"].append(True)
            #     else:
            #         tmp["ignore"].append(False)
            #     coor = np.array(coor).reshape([4,2])
            #     tmp["area"].append(cv2.contourArea(coor))
            res[i-1] = tmp
    return res

另外,请问加载图像时index为什么加1,我把加1去掉了?

index += 1

    filename = os.path.join(dir, self.images_name[index] + ".jpg")

ligaoyuan-potato avatar Aug 07 '20 06:08 ligaoyuan-potato

把lr调小一点就好了,但是我的训练结果非常差。。。

rsqai avatar Aug 18 '20 03:08 rsqai

index+1那里你改了吗?这里是不是不用+1啊

------------------ 原始邮件 ------------------ 发件人: "cheerss/PixelLink-with-pytorch" <[email protected]>; 发送时间: 2020年8月18日(星期二) 中午11:47 收件人: "cheerss/PixelLink-with-pytorch"<[email protected]>; 抄送: "li_gaoy"<[email protected]>;"Author"<[email protected]>; 主题: Re: [cheerss/PixelLink-with-pytorch] iteration 12: pixel_loss: nan, link_loss: nan, total loss: nan, time: 3.7550010681152344 (#11)

把lr调小一点就好了,但是我的训练结果非常差。。。

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

ligaoyuan-potato avatar Aug 19 '20 09:08 ligaoyuan-potato

你好,请问那个index+1那里你改了吗?

------------------ 原始邮件 ------------------ 发件人: "li_gaoy" <[email protected]>; 发送时间: 2020年8月19日(星期三) 下午5:33 收件人: "cheerss/PixelLink-with-pytorch"<[email protected]>;"cheerss/PixelLink-with-pytorch"<[email protected]>; 抄送: "Author"<[email protected]>; 主题: 回复: [cheerss/PixelLink-with-pytorch] iteration 12: pixel_loss: nan, link_loss: nan, total loss: nan, time: 3.7550010681152344 (#11)

index+1那里你改了吗?这里是不是不用+1啊

------------------ 原始邮件 ------------------ 发件人: "cheerss/PixelLink-with-pytorch" <[email protected]>; 发送时间: 2020年8月18日(星期二) 中午11:47 收件人: "cheerss/PixelLink-with-pytorch"<[email protected]>; 抄送: "li_gaoy"<[email protected]>;"Author"<[email protected]>; 主题: Re: [cheerss/PixelLink-with-pytorch] iteration 12: pixel_loss: nan, link_loss: nan, total loss: nan, time: 3.7550010681152344 (#11)

把lr调小一点就好了,但是我的训练结果非常差。。。

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

ligaoyuan-potato avatar Aug 24 '20 11:08 ligaoyuan-potato

你好,请问你用了多少数据?可以加一下微信交流一下吗?13720549350

------------------ 原始邮件 ------------------ 发件人: "cheerss/PixelLink-with-pytorch" <[email protected]>; 发送时间: 2020年8月18日(星期二) 中午11:47 收件人: "cheerss/PixelLink-with-pytorch"<[email protected]>; 抄送: "li_gaoy"<[email protected]>;"Author"<[email protected]>; 主题: Re: [cheerss/PixelLink-with-pytorch] iteration 12: pixel_loss: nan, link_loss: nan, total loss: nan, time: 3.7550010681152344 (#11)

把lr调小一点就好了,但是我的训练结果非常差。。。

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

ligaoyuan-potato avatar Aug 25 '20 01:08 ligaoyuan-potato