cnn_graph icon indicating copy to clipboard operation
cnn_graph copied to clipboard

node signal is vector

Open va1102 opened this issue 6 years ago • 5 comments

I appreciate your implementation. In the introduction of usage, an example of data matrix X=[x1,...,xn]^T is used. xi is a vector containing signals on all nodes in the graph. The signal on each node is a scalar. My question is if the signal on each node is a vector i.e., xi is a matrix, will the original implementation work? Thank you!

va1102 avatar Feb 16 '18 21:02 va1102

It will almost work. ;) You'll however need to make some small changes. The first is to comment the line x = tf.expand_dims(x, 2) # N x M x F=1 in lib/models.py. That will allow you to pass a rank-3 tensor with a number of features F larger than one.

mdeff avatar Mar 05 '18 14:03 mdeff

Thank you!

va1102 avatar Mar 05 '18 14:03 va1102

va1102 have you figured out what else should be modified? If so, could u tell?

AndrewLischishin avatar May 07 '18 10:05 AndrewLischishin

@AndrewLischishin in addition to the change @mdeff highlighted, you also need to make minor modifications to the function that builds the model's computational graph (build_graph) and also the fit() and predict() functions. There might be more modifications required but the aforementioned ones work for me so far, and everything appears to run fine when I use 'multivariate' (vector-valued) signals

ghalib-bello avatar Sep 05 '18 09:09 ghalib-bello

@AndrewLischishin in addition to the change @mdeff highlighted, you also need to make minor modifications to the function that builds the model's computational graph (build_graph) and also the fit() and predict() functions. There might be more modifications required but the aforementioned ones work for me so far, and everything appears to run fine when I use 'multivariate' (vector-valued) signals

Excuse me, could you please tell me where you have changed in build_graph(lib/models.py)?

Riofd avatar Apr 01 '20 15:04 Riofd