Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问题汇总 #256

Open
ghLcd9dG opened this issue Apr 7, 2024 · 1 comment
Open

问题汇总 #256

ghLcd9dG opened this issue Apr 7, 2024 · 1 comment

Comments

@ghLcd9dG
Copy link

ghLcd9dG commented Apr 7, 2024

1、TypeError: ('Keyword argument not understood:', 'input')

A: Model文件里面的input修改为
model = Model(inputs=inputs, outputs=conv10)

2、cannot write mode F as PNG

A: 参见问题3,修改saveResult

3、训练完结果是黑色的/白色的

A: 训练的轮数太少了,loss不下降 / saveResult 函数没有改过来

for i, item in enumerate(npyfile):
        img = (
            labelVisualize(num_class, COLOR_DICT, item)
            if flag_multi_class
            else item[:, :, 0]
        )
        img = (img > 0.5).astype(np.uint8)  # .reshape(256, 256)
        img = img * 255
        cv2.imwrite(os.path.join(save_path, "%d_predict.png" % i), img)

4、结果应该是什么样子的

image

5、修改好的代码/成品

正在提PR,地址:https://github.com/Fab-Liu/unet.git

@2462370039
Copy link

您好,跑您刚修改后的代码还是输出全白图片,loss也是nan
43/300 [===>..........................] - ETA: 46s - loss: nan - accuracy: 0.5420
这是什么原因?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants