Open akpas001 opened 2 years ago
I'm not sure I understand your action for-loop (the for-loop around i
seems to be unnecessary as far as I can tell). Otherwise, the code looks good to me. How does the model perform when you replace the GINConv
layers with simple MLPs?
So, what i am trying to do with action for loop is,
I am basically trying to append actions to node features to every node, (i have 9 nodes in total), so my x basically is (batch_size9,30). (num_features = 30), and i am reconstructing it to(batch_size9,10), then appending actions to it which is again making it (batch_size*9,40).
Since i have 9 nodes i need to repeat the same action 9 times in order to append it to every node from the same set of nodes.
I haven't checked the performance of simple MLPs yet. I thought this to be a coding mistake and was trying to figure out the reason for it.
So the shape of x
is [batch_size, num_nodes, num_features]
or [batch_size * num_nodes, num_features]
? In case of the latter, you will also need to replicate edge_index
, as it currently only points to indices to the first 9 nodes.
The latter. I processed the data through dataloader, so all of that had been taken care of.
How does the final act
look like? Is that a one-hot encoded vector?
yes, it is a one hot encoded vector. I am attaching an image for your reference. Size is (288,30) because, batch size = 32 and num_nodes = 9. now this gets appended along dim = 1 for every node.
Thanks. One thing I don't understand in your network is the flatten()
call. Shouldn't this be a global_mean_pool
?
even i'm not sure about that, I thought of trying both.
but the network is giving a loss of 0.3 only... i still do not understand the mistakes i am making here
How does your new network look like? In the current one, you have a Linear
layer with input channels batch_size * 360
, which is quite weird as the number of parameters should never depend on the batch size :)
I don't think that is an issue because I am using fc1 for getting one of the outputs. and the loss doesn't improve even in that case.
Regarding the network i am using almost the same network, except I rewrote the network into a GraphAutoEncoder. 1.txt here is the file for your reference
You are right. As far as I can see, there isn't a mistake in computing x1
although the computation of x2
might be still worth to fix. I'm sorry that I cannot be of more help :(
Thanks for the help!
Discussed in https://github.com/pyg-team/pytorch_geometric/discussions/3455