Multiclass_Metasurface_InverseDesign icon indicating copy to clipboard operation
Multiclass_Metasurface_InverseDesign copied to clipboard

Problem about training the model

Open aliinassiri opened this issue 3 years ago • 10 comments

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 .

aliinassiri avatar Jun 25 '22 14:06 aliinassiri

i met the same problem, did u solve it?

Orrinn avatar Jul 02 '22 14:07 Orrinn

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

aliinassiri avatar Jul 03 '22 18:07 aliinassiri

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

Orrinn avatar Jul 04 '22 19:07 Orrinn

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 .

aliinassiri avatar Aug 21 '22 13:08 aliinassiri

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.

hzyliusha avatar Mar 17 '23 17:03 hzyliusha

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

Yu-Chen-Yi avatar Jul 15 '23 16:07 Yu-Chen-Yi

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

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

请问该如何操作

xulin23 avatar Dec 20 '23 08:12 xulin23

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

FengNDXN avatar Jul 02 '24 08:07 FengNDXN

"Hello, this is my loss graph. It seems that there isn't a competitive relationship forming. Could you suggest some measures for improvement?" thanks!!!! image

@Yu-Chen-Yi @xulin23 @Orrinn @hzyliusha @aliinassiri

zmtttt avatar Oct 07 '24 10:10 zmtttt

“你好,这是我的损失图。似乎没有形成竞争关系。您能提出一些改进措施吗?谢谢!!! image

@Yu-Chen-Yi @xulin23 @Orrinn @hzyliusha @aliinassiri

Maybe you can change the random seed on the author's code, I changed the random seed and smaller learning rate after the loss map became look normal, but the output nanostructure picture is very bad

FengNDXN avatar Oct 11 '24 12:10 FengNDXN