Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Yingtong Hu 04e391ee4d | 1 year ago | |
---|---|---|
.. | ||
dataset | 2 years ago | |
docs | 2 years ago | |
src | 2 years ago | |
README.md | 3 months ago | |
README_CN.md | 3 months ago | |
eval.py | 2 years ago | |
train.py | 2 years ago |
In some scenarios of electromagnetic simulation (such as tolerance evaluation), the structure can be described by a set of parameters. These parameters can be used as the input of neural network to simulate the scattering parameters of different structures. This section describes how to use parameterized electromagnetic simulation method of MindElec to calculate the scattering parameters of antennas and mobile phones. For details, see the parametrized electromagnetic simulation tutorial.
The following figure shows the network architecture of the parametrized electromagnetic simulation model.
The network inputs are the changed parameters, and the output is the S11 parameter of each frequency (S11 is the only component of scattering parameter in single port scenario).
Use the generate_data
function in src/dataset.py
to automatically obtain 25 x 50 x 25 block data from the original point cloud data for training or testing.
.
└─parameterization
├─README.md
├─docs # schematic diagram of README
├─src
├──dataset.py # Dataset config
├──loss.py # Loss function
├──maxwell_model.py # Parameterized electromagnetic simulation model
├──train.py # Model train
├──eval.py # Model eval
You can configure training and evaluation parameters in train.py
and eval.py
.
"epoch": 10000, # number of epochs
"print_interval":1000, # interval for evaluation
"batch_size": 8, # size of mini-batch
"lr": 0.0001, # basic learning rate
"input_dim": 3, # parameter Dimension
"device_num": 1, # training in this equipment
"device_target": "Ascend", # device Name Ascend/GPU
"checkpoint_dir": './ckpt/', # checkpoint saved path
"save_graphs_path": './graph_result/', # graphs saved path
"input_path": './dataset/Butterfly_antenna/data_input.npy', # input parameter dataset path
"label_path": './dataset/Butterfly_antenna/data_label.npy', # output S11 dataset Path
You can use the train.py script to train a parameterized electromagnetic simulation model. During the training, the model parameters are automatically saved in the configured output directory.
python train.py --input_path INPUT_PATH
--label_path LABEL_PATH
--device_num 0
--checkpoint_dir CKPT_PATH
The seed for the create_dataset
function are set in dataset.py
. Random seeds in train.py are also used.
Visit the official website home page.
MindScience is scientific computing kits for various industries based on the converged MindSpore framework.
Jupyter Notebook Python Unity3D Asset Pickle nesC other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》