matrix-product | R Documentation |
Mimic of the 'base' functions %*%
, crossprod
, tcrossprod
to operate on gpu.matrix-class objects.
## S4 method for signature 'gpu.matrix.tensorflow,ANY'
x %*% y
## S4 method for signature 'gpu.matrix.torch,ANY'
x %*% y
## S4 method for signature 'gpu.matrix.tensorflow,ANY'
crossprod(x, y,...)
## S4 method for signature 'gpu.matrix.tensorflow,missing'
crossprod(x, y = NULL,...)
## S4 method for signature 'gpu.matrix.tensorflow,ANY'
tcrossprod(x, y,...)
## S4 method for signature 'gpu.matrix.tensorflow,missing'
tcrossprod(x, y = NULL,...)
## S4 method for signature 'gpu.matrix.torch,ANY'
crossprod(x, y,...)
## S4 method for signature 'gpu.matrix.torch,missing'
crossprod(x, y = NULL,...)
## S4 method for signature 'gpu.matrix.torch,ANY'
tcrossprod(x, y,...)
## S4 method for signature 'gpu.matrix.torch,missing'
tcrossprod(x, y = NULL,...)
x |
a |
y |
a |
... |
potentially more arguments passed to and from methods. |
Internally, these functions call the appropriate tensorflow or torch function to perform the matrix product (depending on the type of input gpu.matrix-class).
If the input gpu.matrix-class object(s) are stored on the GPU, then the operations will be performed on the GPU. See gpu.matrix
.
A gpu.matrix-class object with the result of the matrix product.
signature(x = "gpu.matrix.tensorflow", y = "ANY")
:
Matrix multiplication
signature(x = "gpu.matrix.tensorflow", y = "ANY")
:
Matrix multiplication
signature(x = "gpu.matrix.tensorflow", y = "missing")
:
Matrix multiplication
signature(x = "gpu.matrix.tensorflow", y = "ANY")
:
Matrix multiplication
signature(x = "gpu.matrix.tensorflow", y = "missing")
:
Matrix multiplication
signature(x = "gpu.matrix.torch", y = "ANY")
:
Matrix multiplication
signature(x = "gpu.matrix.torch", y = "ANY")
:
Matrix multiplication
signature(x = "gpu.matrix.torch", y = "missing")
:
Matrix multiplication
signature(x = "gpu.matrix.torch", y = "ANY")
:
Matrix multiplication
signature(x = "gpu.matrix.torch", y = "missing")
:
Matrix multiplication
tcrossprod
in R's base, and
crossprod
and %*%
.
Matrix package %&%
for boolean matrix product
methods.
Also see torch_matmul
## Not run:
a <- gpu.matrix(rnorm(12),nrow=4,ncol=3)
b <- t(a)
b
crossprod(a,a)
b <- a
b
tcrossprod(a)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.