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

Problem about training the model #2

Open
aliinassiri opened this issue Jun 25, 2022 · 8 comments
Open

Problem about training the model #2

aliinassiri opened this issue Jun 25, 2022 · 8 comments

Comments

@aliinassiri
Copy link

aliinassiri commented Jun 25, 2022

Hello, many thanks for putting these information about the model. I have problem while running the DCGAN_Train.py file. When the training loop starts after second batch ,the values of Discriminator and Generator loss don't change and D(x) ,G(D(Z)) will be 1. I don't have any idea about this problem. I run the file on windows 10, NVIDIA GEFORCE GTX 1650
bandicam 2022-06-25 14-13-41-830
.

@Orrinn
Copy link

Orrinn commented Jul 2, 2022

i met the same problem, did u solve it?

@aliinassiri
Copy link
Author

i met the same problem, did u solve it?

i change learning rate to 0.00001 and i think it has positive impact on the loss (i guess the problem is due to different types of GPU that we use). if you could find the problem help me about this
2

@Orrinn
Copy link

Orrinn commented Jul 4, 2022

thank u. i gonna try it. i tried to use different random seed, but the GAN was collapse and i got the follow loss image......
So are u GAN work properly?
image

@aliinassiri
Copy link
Author

thank u. i gonna try it. i tried to use different random seed, but the GAN was collapse and i got the follow loss image...... So are u GAN work properly? image

sorry for replying late. I Train the model with learning rate that I have mentioned before for 500 epoch. The loss of the model is in the below image. I think because of changing learning rate for better result I have to train for more than 500 epoch. And other problem I have is that when I want to validate the result with the Lumerical, the scripts that the author provided doesn't work, Do you have similar problem?
Figure 2022-08-04 094745
.

@hzyliusha
Copy link

I doubt that the picture is not aligned with the data in excel, because the code does not consider whether the picture is aligned with the data in excel.

@Yu-Chen-Yi
Copy link

I doubt that the picture is not aligned with the data in excel, because the code does not consider whether the picture is aligned with the data in excel.

I think there might be an issue with the 'importbinary(files{i}, 'microns');' command for loading the file. It's possible that the older version of Lumerical and the newer version have slightly different ways of importing images.
I'm going to manually input the image instead of using the command for this line. Currently, the generated absorption spectrum by Gnet doesn't differ significantly from the spectral characteristics used for training.
360181567_626417269447776_3909386154965243711_n

@xulin23
Copy link

xulin23 commented Dec 20, 2023

我怀疑图片与excel中的数据没有对齐,因为代码没有考虑图片与excel中的数据是否对齐。

我认为 'importbinary(files{i}, 'microns');' 可能存在问题 用于加载文件的命令。旧版本的 Lumerical 和新版本的导入图像的方式可能略有不同。 我将手动输入图像,而不是使用此行的命令。目前,Gnet 生成的吸收光谱与用于训练的光谱特征没有显着差异。 360181567_626417269447776_3909386154965243711_n

请问该如何操作

@FengNDXN
Copy link

FengNDXN commented Jul 2, 2024

thank u. i gonna try it. i tried to use different random seed, but the GAN was collapse and i got the follow loss image...... So are u GAN work properly? image

sorry for replying late. I Train the model with learning rate that I have mentioned before for 500 epoch. The loss of the model is in the below image. I think because of changing learning rate for better result I have to train for more than 500 epoch. And other problem I have is that when I want to validate the result with the Lumerical, the scripts that the author provided doesn't work, Do you have similar problem? Figure 2022-08-04 094745 .

Hello, when I adjust the learning rate to 0.00001 as you said, the value of D(x) becomes zero all the time, and the discriminator can't make a judgment on the real and the output picture, do you know how to solve it?
6d3d33efdbfb9644254595232646a63

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

6 participants