dmsgnn / master-thesis

MLIR-based FPGA toolchain for Graph Neural Network acceleration using High-Level Synthesis. Developed for the Master of Science research thesis.
0 stars 0 forks source link

Standalone inference #1

Closed dmsgnn closed 1 year ago

dmsgnn commented 1 year ago

description

The aim of this functionality is to implement, by args parameter, the possibility to save the model from main script avoiding the inference part. A new script (or a main implementation) will be then created for inference only purpose, where the model will be uploaded and only inference will be executed.

requirements

dmsgnn commented 1 year ago

training

the file main_pyg.py has been modified to automatically save the model at the end of the script.

the model can be trained launching the main file from command line as

python main_pyg.py --dataset ogbg-molhiv --gnn gin --epochs 1 --batch_size 1 

inference

once the model has been saved, it can be used to perform inference only. It can be done using the new added args parameter --inference, which should be set to true. Then the model will be automatically retrieved using the other parameters. an example of inference only is provided below.

python main_pyg.py --dataset ogbg-molhiv --gnn gin --epochs 1 --batch_size 1 --inference true