zjost / blog_code

A repo for holding example code
Apache License 2.0
149 stars 76 forks source link

Why is there no bias in the output of GCN layer and why there is linear layer before softmax implementation? #12

Closed utkarsh0902311047 closed 1 year ago

utkarsh0902311047 commented 1 year ago

Hi,

  1. I was reading the Thomas N. Kipf pytorch implementation of GCN [https://github.com/tkipf/pygcn/blob/master/pygcn/layers.py]. If I understand correctly, he adds bias to every GCN layer output [line 35]. Why is it so? Is it required to be done in Numpy implementation, too?
  2. Also, there is no linear layer before the softmax layer. Why does the numpy implementation have a linear layer before the softmax implementation in the softmax_layer function?

Please help Thank you

zjost commented 1 year ago

All of these permutations you're describing are sensible options, and I'm not aware of any good reason to decide one way vs the other, aside from checking empirically what works the best. It will also probably depend on the data.