Your task is to implement the forward pass of a single Graph Convolutional Network (GCN) layer as introduced by Kipf & Welling (2017).
A GCN layer aggregates information from a node's neighbors in a graph and transforms it using a learnable weight matrix, followed by a ReLU activation.
Write a function gcn_layer(A, X, W) that takes:
A: An adjacency matrix of shape (N, N) representing the graph structure, where N is the number of nodes. A[i][j] = 1 means there is an edge between node i and node j.X: A node feature matrix of shape (N, F_in) where F_in is the input feature dimension.W: A weight matrix of shape (F_in, F_out) where F_out is the output feature dimension.The function should return the output node feature matrix of shape (N, F_out) after applying:
All inputs will be numpy arrays with float values.