R/torch_crossprod.R

Defines functions torch_crossprod

#' @export
torch_crossprod<-function(x,
                          y = NULL)
{
  xt = torch_transpose_batch(x)
  if( is.null(y) ){
    mat = torch_matmul(xt,x)
  }
  else{
    mat = torch_matmul(xt,y)
  }
  return( mat )
}
adsb85/lqp documentation built on April 9, 2022, 12:35 a.m.