Chain_matmul
torch_chain_matmul(matrices)
(Tensors...) a sequence of 2 or more 2-D tensors whose product is to be determined.
Returns the matrix product of the [CLRS]
_). Note that since this is a function to compute the product,
if (torch_is_installed()) {
a = torch_randn(c(3, 4))
b = torch_randn(c(4, 5))
c = torch_randn(c(5, 6))
d = torch_randn(c(6, 7))
torch_chain_matmul(list(a, b, c, d))
}
Run the code above in your browser using DataLab