R/torch_norm_2.R

Defines functions torch_norm_2

#' @export
torch_norm_2<-function(x,
                       dim,
                       keepdim = FALSE,
                       dtype = NULL)
{

  sqrt( torch_sum(x^2,dim = dim,keepdim = keepdim,dtype = dtype))

}
adsb85/lqp documentation built on April 9, 2022, 12:35 a.m.