hehaodele / circuit-gnn

[ICML 2019] Circuit-GNN: Graph Neural Networks for Distributed Circuit Design http://circuit-gnn.csail.mit.edu/
95 stars 17 forks source link

what is the definition of node_attr and edge_atttr in the code? #3

Open YY-WW518 opened 3 years ago

YY-WW518 commented 3 years ago

Dear He Hao, I found the definition of node attributes and edge attributes in the paper are different from those of the code. In the paper, the node attributes and edge attributes are 1x2 and 1x6 vectors, respectively, while in the code, they are 1x11 and 1x20 vectors, respectively. Could you please explain the definition of the node attributes and edge attributes in the code? Best, YW

hehaodele commented 3 years ago

Hi YW,

To figure out the deep learning input features, I recommend you check the function prepare_input_batch in inverse.py. This function basically tells you how the raw parameters of a circuit are translated into the inputs of CircuitGNN.

For example, for the node in the Circuit graph, each resonator has 9 raw parameters [x, y, a, w, gap_x, gap_y, gap_dx, gap_dy, u]. While the node attributes of the input graph have an 11-dimensional feature with the following structure [is_input, is_output, a, u_side, u_shift]

Similarly, you should be able to find out how the edge attributes are constructed.

Best, Hao