Learn R Programming

GPUmatrix (version 1.0.2)

kroneker: kroneker Products

Description

Kroneker product of two gpu.matrix-class objects. This function mimics the 'base' function 'kronecker' to operate on gpu.matrix-class objects.

Usage

# S4 method for ANY,gpu.matrix.tensorflow
%x%(X,Y)
# S4 method for ANY,gpu.matrix.torch
%x%(X,Y)
# S4 method for gpu.matrix.tensorflow,ANY
%x%(X,Y)
# S4 method for gpu.matrix.torch,ANY
%x%(X,Y)

Arguments

X

A gpu.matrix.

Y

A gpu.matrix or a matrix or a numeric variable.

Details

The function %x% internally calls the corresponding function of the library torch or tensorflow (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.

See Also

See Also kronecker and torch_kron.

Examples

Run this code

# \donttest{
if (FALSE) {

a <- gpu.matrix(1:9,nrow=3,ncol=3)
a %x% diag(1,3)


}
# }

Run the code above in your browser using DataLab