Python(编程语言)
时域有限差分法
MATLAB语言
计算机科学
人工智能
库达
计算机视觉
计算科学
分类器(UML)
光辉
计算机工程
热的
反向
算法
模拟
机器学习
光子学
协同仿真
数据建模
计算机图形学(图像)
软件
工程制图
反问题
训练集
代码生成
Java
作者
Xiao, Chengyu,Zhou, Han
标识
DOI:10.5281/zenodo.15229359
摘要
Code and dataset for inverse design of thermal meta-emitters System requirments Dependencies Tensorflow > 2.7.4 Tested Environments Python 3.8, Tensorflow 2.7.4, CUDA 10.1,cuDNN 7.6 Python 3.9, Tensorflow 2.7.4, CPU devices Other softwares Lumerical FDTD and corresponding versions of MATLAB for joint simulation and validation screenin Installation Miniconda (3 mins) conda create -n design python=3.8 conda activate design conda install tensorflow-gpu==2.7.4 spyder Instrucstionas and demo This program does not provide an external API for calling. Adjustments to the target spectral parameters must be made within the script before running. Dataset colletion (~15 mins per model) Path: tme_constructionRun model_generate.m in MATLAB to obtain random photonic structures and material sequences.Run model-generate.lsf in Lumerical FDTD to obtain simulation files for each photonic structure.Run ir_jobcontroller.lsf, vis_jobcontroller.lsf, and export-response.lsf in Lumerical FDTD to obtain the spectral responses for all models. K-S sampling (~120 mins) Path: 0-pretreatmentRun KS-sampling.py to obtain a subset of data with a more uniform spectral distribution. Dimensional reduction (~3 mins) Path: 1-autoencoderRun autoencoder-respose.py to obtain dimensionality-reduced spectral data.Run autoencoder-onlyparam.py to obtain dimensionality-reduced geometric parameter data.Run autoencoder-onlynk.py to obtain dimensionality-reduced material information.The concatenated dimensionality-reduced information will be used for subsequent training and generation of GANs. Prediction (~1.5 hours) Path: 2-predRun design2response_aenkversio.py or design2response_allaeversio.pyto train and save the prediction module. cGAN (~8 hours) Path: 3-cganRun generator_pretrain.py to pretrain the generator.Run cgan.py to undergo the lengthy adversarial training process. You can use TensorBoard to monitor the training progress. Generation and posttreatment (TME-1 as demo) Run TME1demo.py to obtain 2000 candidate models. Some of these models may have duplicates.Run materialclassfier.py to identify the generated material options. Others info: Adaptive Sampling Algorithm A recursive adaptive sampling algorithm that captures full spectral features with fewer data points, minimizing visual clutter in graphs. def adaptive_sample(x: np.ndarray, y: np.ndarray, tol: float) -> np.ndarray: indices = [0, len(x) - 1] def recurse(i0: int, i1: int): xi, xj = x[i0], x[i1] yi, yj = y[i0], y[i1] mids = np.arange(i0+1, i1) if mids.size == 0: return y_line = yi + (yj - yi) * ((x[mids] - xi) / (xj - xi)) err = np.abs(y[mids] - y_line) k = np.argmax(err) if err[k] > tol: imax = mids[k] indices.append(imax) recurse(i0, imax) recurse(imax, i1) recurse(0, len(x) - 1) return np.array(sorted(indices), dtype=int)
科研通智能强力驱动
Strongly Powered by AbleSci AI