knowing the input matrix size of the nngraph module online

7 views
Skip to first unread message

Joo-Kyung Kim

unread,
Dec 3, 2016, 10:33:14 AM12/3/16
to torch7
Hello,

Given a m*n matrix A and a n dimensional vector B, I'd like to make a m*2n matrix, where the first n columns are from A and the last n columns are replication of the vector B in nngraph module.
If we know that the row length of matrix A is m, then we can do as follows

A = nn.Identity()()
B = nn.Identity()()
Brep = nn.Replicate(m)(B)
C = nn.JoinTable()({A, Brep})

However, if the row length of matrix A is not given advance, how can I replicate B vector so that the row size of Brep is the same as that of A?

Thanks.

 Joo-Kyung
Reply all
Reply to author
Forward
0 new messages