text
stringlengths 0
601k
|
---|
let mse_loss self ~ target ~ reduction = let out__ = CArray . make t 1 in stubs_mse_loss ( CArray . start out__ ) self target ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mse_loss_backward ~ grad_output self ~ target ~ reduction = let out__ = CArray . make t 1 in stubs_mse_loss_backward ( CArray . start out__ ) grad_output self target ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mse_loss_backward_grad_input ~ grad_input ~ grad_output self ~ target ~ reduction = let out__ = CArray . make t 1 in stubs_mse_loss_backward_grad_input ( CArray . start out__ ) grad_input grad_output self target ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mse_loss_out ~ out self ~ target ~ reduction = let out__ = CArray . make t 1 in stubs_mse_loss_out ( CArray . start out__ ) out self target ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let msort self = let out__ = CArray . make t 1 in stubs_msort ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let msort_out ~ out self = let out__ = CArray . make t 1 in stubs_msort_out ( CArray . start out__ ) out self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mul self other = let out__ = CArray . make t 1 in stubs_mul ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mul_ self other = let out__ = CArray . make t 1 in stubs_mul_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mul_out ~ out self other = let out__ = CArray . make t 1 in stubs_mul_out ( CArray . start out__ ) out self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mul_scalar self other = let out__ = CArray . make t 1 in stubs_mul_scalar ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mul_scalar_ self other = let out__ = CArray . make t 1 in stubs_mul_scalar_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multi_margin_loss_backward ~ grad_output self ~ target ~ p ~ margin ~ weight ~ reduction = let out__ = CArray . make t 1 in stubs_multi_margin_loss_backward ( CArray . start out__ ) grad_output self target p margin ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multi_margin_loss_backward_grad_input ~ grad_input ~ grad_output self ~ target ~ p ~ margin ~ weight ~ reduction = let out__ = CArray . make t 1 in stubs_multi_margin_loss_backward_grad_input ( CArray . start out__ ) grad_input grad_output self target p margin ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multilabel_margin_loss self ~ target ~ reduction = let out__ = CArray . make t 1 in stubs_multilabel_margin_loss ( CArray . start out__ ) self target ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multilabel_margin_loss_backward ~ grad_output self ~ target ~ reduction ~ is_target = let out__ = CArray . make t 1 in stubs_multilabel_margin_loss_backward ( CArray . start out__ ) grad_output self target ( Reduction . to_int reduction |> Int64 . of_int ) is_target ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multilabel_margin_loss_backward_grad_input ~ grad_input ~ grad_output self ~ target ~ reduction ~ is_target = let out__ = CArray . make t 1 in stubs_multilabel_margin_loss_backward_grad_input ( CArray . start out__ ) grad_input grad_output self target ( Reduction . to_int reduction |> Int64 . of_int ) is_target ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multilabel_margin_loss_out ~ out self ~ target ~ reduction = let out__ = CArray . make t 1 in stubs_multilabel_margin_loss_out ( CArray . start out__ ) out self target ( Reduction . to_int reduction |> Int64 . of_int ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multinomial self ~ num_samples ~ replacement = let out__ = CArray . make t 1 in stubs_multinomial ( CArray . start out__ ) self ( Int64 . of_int num_samples ) ( if replacement then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multinomial_out ~ out self ~ num_samples ~ replacement = let out__ = CArray . make t 1 in stubs_multinomial_out ( CArray . start out__ ) out self ( Int64 . of_int num_samples ) ( if replacement then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multiply self other = let out__ = CArray . make t 1 in stubs_multiply ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multiply_ self other = let out__ = CArray . make t 1 in stubs_multiply_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multiply_out ~ out self other = let out__ = CArray . make t 1 in stubs_multiply_out ( CArray . start out__ ) out self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multiply_scalar self other = let out__ = CArray . make t 1 in stubs_multiply_scalar ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let multiply_scalar_ self other = let out__ = CArray . make t 1 in stubs_multiply_scalar_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mv self ~ vec = let out__ = CArray . make t 1 in stubs_mv ( CArray . start out__ ) self vec ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mv_out ~ out self ~ vec = let out__ = CArray . make t 1 in stubs_mv_out ( CArray . start out__ ) out self vec ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mvlgamma self ~ p = let out__ = CArray . make t 1 in stubs_mvlgamma ( CArray . start out__ ) self ( Int64 . of_int p ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mvlgamma_ self ~ p = let out__ = CArray . make t 1 in stubs_mvlgamma_ ( CArray . start out__ ) self ( Int64 . of_int p ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let mvlgamma_out ~ out self ~ p = let out__ = CArray . make t 1 in stubs_mvlgamma_out ( CArray . start out__ ) out self ( Int64 . of_int p ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nan_to_num self ~ nan ~ posinf ~ neginf = let out__ = CArray . make t 1 in stubs_nan_to_num ( CArray . start out__ ) self nan posinf neginf ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nan_to_num_ self ~ nan ~ posinf ~ neginf = let out__ = CArray . make t 1 in stubs_nan_to_num_ ( CArray . start out__ ) self nan posinf neginf ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nan_to_num_out ~ out self ~ nan ~ posinf ~ neginf = let out__ = CArray . make t 1 in stubs_nan_to_num_out ( CArray . start out__ ) out self nan posinf neginf ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanmean self ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_nanmean ( CArray . start out__ ) self ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanmean_out ~ out self ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_nanmean_out ( CArray . start out__ ) out self ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanmedian self = let out__ = CArray . make t 1 in stubs_nanmedian ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanmedian_dim self ~ dim ~ keepdim = let out__ = CArray . make t 2 in stubs_nanmedian_dim ( CArray . start out__ ) self ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; let t1 = CArray . get out__ 1 in Gc . finalise C . Tensor . free t1 ; t0 , t1 |
let nanmedian_dim_values ~ values ~ indices self ~ dim ~ keepdim = let out__ = CArray . make t 2 in stubs_nanmedian_dim_values ( CArray . start out__ ) values indices self ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; let t1 = CArray . get out__ 1 in Gc . finalise C . Tensor . free t1 ; t0 , t1 |
let nanquantile self ~ q ~ dim ~ keepdim = let out__ = CArray . make t 1 in stubs_nanquantile ( CArray . start out__ ) self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_new self ~ q ~ dim ~ keepdim ~ interpolation = let out__ = CArray . make t 1 in stubs_nanquantile_new ( CArray . start out__ ) self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) interpolation ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_new_out ~ out self ~ q ~ dim ~ keepdim ~ interpolation = let out__ = CArray . make t 1 in stubs_nanquantile_new_out ( CArray . start out__ ) out self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) interpolation ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_new_scalar self ~ q ~ dim ~ keepdim ~ interpolation = let out__ = CArray . make t 1 in stubs_nanquantile_new_scalar ( CArray . start out__ ) self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) interpolation ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_new_scalar_out ~ out self ~ q ~ dim ~ keepdim ~ interpolation = let out__ = CArray . make t 1 in stubs_nanquantile_new_scalar_out ( CArray . start out__ ) out self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) interpolation ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_out ~ out self ~ q ~ dim ~ keepdim = let out__ = CArray . make t 1 in stubs_nanquantile_out ( CArray . start out__ ) out self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_scalar self ~ q ~ dim ~ keepdim = let out__ = CArray . make t 1 in stubs_nanquantile_scalar ( CArray . start out__ ) self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nanquantile_scalar_out ~ out self ~ q ~ dim ~ keepdim = let out__ = CArray . make t 1 in stubs_nanquantile_scalar_out ( CArray . start out__ ) out self q ( Int64 . of_int dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nansum self ~ dtype = let out__ = CArray . make t 1 in stubs_nansum ( CArray . start out__ ) self ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nansum_dim_intlist self ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_nansum_dim_intlist ( CArray . start out__ ) self ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nansum_intlist_out ~ out self ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_nansum_intlist_out ( CArray . start out__ ) out self ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let narrow self ~ dim ~ start ~ length = let out__ = CArray . make t 1 in stubs_narrow ( CArray . start out__ ) self ( Int64 . of_int dim ) ( Int64 . of_int start ) ( Int64 . of_int length ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let narrow_copy self ~ dim ~ start ~ length = let out__ = CArray . make t 1 in stubs_narrow_copy ( CArray . start out__ ) self ( Int64 . of_int dim ) ( Int64 . of_int start ) ( Int64 . of_int length ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let narrow_copy_out ~ out self ~ dim ~ start ~ length = let out__ = CArray . make t 1 in stubs_narrow_copy_out ( CArray . start out__ ) out self ( Int64 . of_int dim ) ( Int64 . of_int start ) ( Int64 . of_int length ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let narrow_tensor self ~ dim ~ start ~ length = let out__ = CArray . make t 1 in stubs_narrow_tensor ( CArray . start out__ ) self ( Int64 . of_int dim ) start ( Int64 . of_int length ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let native_batch_norm input ~ weight ~ bias ~ running_mean ~ running_var ~ training ~ momentum ~ eps = let out__ = CArray . make t 3 in stubs_native_batch_norm ( CArray . start out__ ) input ( match weight with | Some v -> v | None -> null ) ( match bias with | Some v -> v | None -> null ) ( match running_mean with | Some v -> v | None -> null ) ( match running_var with | Some v -> v | None -> null ) ( if training then 1 else 0 ) momentum eps ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; let t1 = CArray . get out__ 1 in Gc . finalise C . Tensor . free t1 ; let t2 = CArray . get out__ 2 in Gc . finalise C . Tensor . free t2 ; t0 , t1 , t2 |
let native_batch_norm_out ~ out ~ save_mean ~ save_invstd input ~ weight ~ bias ~ running_mean ~ running_var ~ training ~ momentum ~ eps = let out__ = CArray . make t 3 in stubs_native_batch_norm_out ( CArray . start out__ ) out save_mean save_invstd input ( match weight with | Some v -> v | None -> null ) ( match bias with | Some v -> v | None -> null ) ( match running_mean with | Some v -> v | None -> null ) ( match running_var with | Some v -> v | None -> null ) ( if training then 1 else 0 ) momentum eps ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; let t1 = CArray . get out__ 1 in Gc . finalise C . Tensor . free t1 ; let t2 = CArray . get out__ 2 in Gc . finalise C . Tensor . free t2 ; t0 , t1 , t2 |
let native_group_norm input ~ weight ~ bias ~ n ~ c ~ hxw ~ group ~ eps = let out__ = CArray . make t 3 in stubs_native_group_norm ( CArray . start out__ ) input ( match weight with | Some v -> v | None -> null ) ( match bias with | Some v -> v | None -> null ) ( Int64 . of_int n ) ( Int64 . of_int c ) ( Int64 . of_int hxw ) ( Int64 . of_int group ) eps ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; let t1 = CArray . get out__ 1 in Gc . finalise C . Tensor . free t1 ; let t2 = CArray . get out__ 2 in Gc . finalise C . Tensor . free t2 ; t0 , t1 , t2 |
let native_layer_norm input ~ normalized_shape ~ weight ~ bias ~ eps = let out__ = CArray . make t 3 in stubs_native_layer_norm ( CArray . start out__ ) input ( List . map Int64 . of_int normalized_shape |> CArray . of_list int64_t |> CArray . start ) ( List . length normalized_shape ) ( match weight with | Some v -> v | None -> null ) ( match bias with | Some v -> v | None -> null ) eps ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; let t1 = CArray . get out__ 1 in Gc . finalise C . Tensor . free t1 ; let t2 = CArray . get out__ 2 in Gc . finalise C . Tensor . free t2 ; t0 , t1 , t2 |
let native_norm self = let out__ = CArray . make t 1 in stubs_native_norm ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let native_norm_scalaropt_dim_dtype self ~ p ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_native_norm_scalaropt_dim_dtype ( CArray . start out__ ) self p ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let ne self other = let out__ = CArray . make t 1 in stubs_ne ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let ne_ self other = let out__ = CArray . make t 1 in stubs_ne_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let ne_scalar_out ~ out self other = let out__ = CArray . make t 1 in stubs_ne_scalar_out ( CArray . start out__ ) out self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let ne_tensor self other = let out__ = CArray . make t 1 in stubs_ne_tensor ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let ne_tensor_ self other = let out__ = CArray . make t 1 in stubs_ne_tensor_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let ne_tensor_out ~ out self other = let out__ = CArray . make t 1 in stubs_ne_tensor_out ( CArray . start out__ ) out self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let neg self = let out__ = CArray . make t 1 in stubs_neg ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let neg_ self = let out__ = CArray . make t 1 in stubs_neg_ ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let neg_out ~ out self = let out__ = CArray . make t 1 in stubs_neg_out ( CArray . start out__ ) out self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let negative self = let out__ = CArray . make t 1 in stubs_negative ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let negative_ self = let out__ = CArray . make t 1 in stubs_negative_ ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let negative_out ~ out self = let out__ = CArray . make t 1 in stubs_negative_out ( CArray . start out__ ) out self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let new_empty self ~ size ~ options = let out__ = CArray . make t 1 in stubs_new_empty ( CArray . start out__ ) self ( List . map Int64 . of_int size |> CArray . of_list int64_t |> CArray . start ) ( List . length size ) ( Kind . packed_to_int ( fst options ) ) ( Device . to_int ( snd options ) ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let new_empty_strided self ~ size ~ stride ~ options = let out__ = CArray . make t 1 in stubs_new_empty_strided ( CArray . start out__ ) self ( List . map Int64 . of_int size |> CArray . of_list int64_t |> CArray . start ) ( List . length size ) ( List . map Int64 . of_int stride |> CArray . of_list int64_t |> CArray . start ) ( List . length stride ) ( Kind . packed_to_int ( fst options ) ) ( Device . to_int ( snd options ) ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let new_full self ~ size ~ fill_value ~ options = let out__ = CArray . make t 1 in stubs_new_full ( CArray . start out__ ) self ( List . map Int64 . of_int size |> CArray . of_list int64_t |> CArray . start ) ( List . length size ) fill_value ( Kind . packed_to_int ( fst options ) ) ( Device . to_int ( snd options ) ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let new_ones self ~ size ~ options = let out__ = CArray . make t 1 in stubs_new_ones ( CArray . start out__ ) self ( List . map Int64 . of_int size |> CArray . of_list int64_t |> CArray . start ) ( List . length size ) ( Kind . packed_to_int ( fst options ) ) ( Device . to_int ( snd options ) ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let new_zeros self ~ size ~ options = let out__ = CArray . make t 1 in stubs_new_zeros ( CArray . start out__ ) self ( List . map Int64 . of_int size |> CArray . of_list int64_t |> CArray . start ) ( List . length size ) ( Kind . packed_to_int ( fst options ) ) ( Device . to_int ( snd options ) ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nextafter self other = let out__ = CArray . make t 1 in stubs_nextafter ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nextafter_ self other = let out__ = CArray . make t 1 in stubs_nextafter_ ( CArray . start out__ ) self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nextafter_out ~ out self other = let out__ = CArray . make t 1 in stubs_nextafter_out ( CArray . start out__ ) out self other ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss self ~ target ~ weight ~ reduction ~ ignore_index = let out__ = CArray . make t 1 in stubs_nll_loss ( CArray . start out__ ) self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss2d self ~ target ~ weight ~ reduction ~ ignore_index = let out__ = CArray . make t 1 in stubs_nll_loss2d ( CArray . start out__ ) self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss2d_backward ~ grad_output self ~ target ~ weight ~ reduction ~ ignore_index ~ total_weight = let out__ = CArray . make t 1 in stubs_nll_loss2d_backward ( CArray . start out__ ) grad_output self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) total_weight ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss2d_backward_grad_input ~ grad_input ~ grad_output self ~ target ~ weight ~ reduction ~ ignore_index ~ total_weight = let out__ = CArray . make t 1 in stubs_nll_loss2d_backward_grad_input ( CArray . start out__ ) grad_input grad_output self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) total_weight ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss2d_out ~ out self ~ target ~ weight ~ reduction ~ ignore_index = let out__ = CArray . make t 1 in stubs_nll_loss2d_out ( CArray . start out__ ) out self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss_backward ~ grad_output self ~ target ~ weight ~ reduction ~ ignore_index ~ total_weight = let out__ = CArray . make t 1 in stubs_nll_loss_backward ( CArray . start out__ ) grad_output self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) total_weight ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss_backward_grad_input ~ grad_input ~ grad_output self ~ target ~ weight ~ reduction ~ ignore_index ~ total_weight = let out__ = CArray . make t 1 in stubs_nll_loss_backward_grad_input ( CArray . start out__ ) grad_input grad_output self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) total_weight ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss_nd self ~ target ~ weight ~ reduction ~ ignore_index = let out__ = CArray . make t 1 in stubs_nll_loss_nd ( CArray . start out__ ) self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nll_loss_out ~ out self ~ target ~ weight ~ reduction ~ ignore_index = let out__ = CArray . make t 1 in stubs_nll_loss_out ( CArray . start out__ ) out self target ( match weight with | Some v -> v | None -> null ) ( Reduction . to_int reduction |> Int64 . of_int ) ( Int64 . of_int ignore_index ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nonzero self = let out__ = CArray . make t 1 in stubs_nonzero ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let nonzero_numpy self = stubs_nonzero_numpy self |> to_tensor_list |
let nonzero_out ~ out self = let out__ = CArray . make t 1 in stubs_nonzero_out ( CArray . start out__ ) out self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm self = let out__ = CArray . make t 1 in stubs_norm ( CArray . start out__ ) self ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm_dtype_out ~ out self ~ p ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_norm_dtype_out ( CArray . start out__ ) out self p ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm_except_dim ~ v ~ pow ~ dim = let out__ = CArray . make t 1 in stubs_norm_except_dim ( CArray . start out__ ) v ( Int64 . of_int pow ) ( Int64 . of_int dim ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm_out ~ out self ~ p ~ dim ~ keepdim = let out__ = CArray . make t 1 in stubs_norm_out ( CArray . start out__ ) out self p ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm_scalaropt_dim self ~ p ~ dim ~ keepdim = let out__ = CArray . make t 1 in stubs_norm_scalaropt_dim ( CArray . start out__ ) self p ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm_scalaropt_dim_dtype self ~ p ~ dim ~ keepdim ~ dtype = let out__ = CArray . make t 1 in stubs_norm_scalaropt_dim_dtype ( CArray . start out__ ) self p ( List . map Int64 . of_int dim |> CArray . of_list int64_t |> CArray . start ) ( List . length dim ) ( if keepdim then 1 else 0 ) ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let norm_scalaropt_dtype self ~ p ~ dtype = let out__ = CArray . make t 1 in stubs_norm_scalaropt_dtype ( CArray . start out__ ) self p ( Kind . packed_to_int dtype ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let normal ~ out ~ mean ~ std = let out__ = CArray . make t 1 in stubs_normal ( CArray . start out__ ) out mean std ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let normal_ self ~ mean ~ std = let out__ = CArray . make t 1 in stubs_normal_ ( CArray . start out__ ) self mean std ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
let normal_float_float_out ~ out ~ mean ~ std ~ size = let out__ = CArray . make t 1 in stubs_normal_float_float_out ( CArray . start out__ ) out mean std ( List . map Int64 . of_int size |> CArray . of_list int64_t |> CArray . start ) ( List . length size ) ; let t0 = CArray . get out__ 0 in Gc . finalise C . Tensor . free t0 ; t0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.