diff --git a/dev/articles/examples/basic-nn-module.html b/dev/articles/examples/basic-nn-module.html index f7e2f4a1f9..ae9ad4ebb9 100644 --- a/dev/articles/examples/basic-nn-module.html +++ b/dev/articles/examples/basic-nn-module.html @@ -133,9 +133,9 @@

basic-nn-module

model$parameters
## $w
 ## torch_tensor
-## -0.3662
-##  1.1301
-## -0.1990
+##  0.5874
+##  0.2547
+## -0.2057
 ## [ CPUFloatType{3,1} ][ requires_grad = TRUE ]
 ## 
 ## $b
@@ -146,9 +146,9 @@ 

basic-nn-module

# or individually model$w
## torch_tensor
-## -0.3662
-##  1.1301
-## -0.1990
+##  0.5874
+##  0.2547
+## -0.2057
 ## [ CPUFloatType{3,1} ][ requires_grad = TRUE ]
 model$b
@@ -163,16 +163,16 @@

basic-nn-module

 y_pred
## torch_tensor
-## -0.4375
-##  0.1599
-##  1.8788
-## -1.8759
-##  0.4374
-## -1.1280
-## -3.3116
-## -0.2800
-##  1.0060
-##  0.8805
+## -0.9153
+##  1.0249
+## -1.0888
+##  0.4401
+##  0.8388
+##  0.2520
+## -0.1044
+##  1.1781
+##  0.0587
+##  0.0623
 ## [ CPUFloatType{10,1} ][ grad_fn = <AddBackward0> ]
diff --git a/dev/articles/indexing.html b/dev/articles/indexing.html index 51d0d8b9aa..ca513715db 100644 --- a/dev/articles/indexing.html +++ b/dev/articles/indexing.html @@ -244,23 +244,23 @@

Getting the complete dimensionx <- torch_randn(2, 3) x #> torch_tensor -#> 0.1092 0.7651 0.4560 -#> -1.0189 0.1967 0.4385 +#> 0.2383 -0.0072 -0.4631 +#> 0.7319 0.0022 -1.2543 #> [ CPUFloatType{2,3} ]

The following syntax will give you the first row:

 x[1,]
 #> torch_tensor
-#>  0.1092
-#>  0.7651
-#>  0.4560
+#>  0.2383
+#> -0.0072
+#> -0.4631
 #> [ CPUFloatType{3} ]

And this would give you the first 2 columns:

 x[,1:2]
 #> torch_tensor
-#>  0.1092  0.7651
-#> -1.0189  0.1967
+#>  0.2383 -0.0072
+#>  0.7319  0.0022
 #> [ CPUFloatType{2,2} ]
@@ -339,15 +339,15 @@

Indexing with vectorsx <- torch_randn(4,4) x[c(1,3), c(1,3)] #> torch_tensor -#> -1.0368 1.1555 -#> -0.4369 -0.0500 +#> -1.4861 -0.0491 +#> -2.4130 0.4294 #> [ CPUFloatType{2,2} ]

You can also use boolean vectors, for example:

 x[c(TRUE, FALSE, TRUE, FALSE), c(TRUE, FALSE, TRUE, FALSE)]
 #> torch_tensor
-#> -1.0368  1.1555
-#> -0.4369 -0.0500
+#> -1.4861 -0.0491
+#> -2.4130  0.4294
 #> [ CPUFloatType{2,2} ]

The above examples also work if the index were long or boolean tensors, instead of R vectors. It’s also possible to index with diff --git a/dev/articles/loading-data.html b/dev/articles/loading-data.html index d69db9b1f0..81f29f1709 100644 --- a/dev/articles/loading-data.html +++ b/dev/articles/loading-data.html @@ -385,7 +385,7 @@

Training with data loaders cat(sprintf("Loss at epoch %d: %3f\n", epoch, mean(l))) } -#> Loss at epoch 1: 190.050138 +#> Loss at epoch 1: 294.393332 #> Loss at epoch 2: 2.068251 #> Loss at epoch 3: 2.068251 #> Loss at epoch 4: 2.068251 diff --git a/dev/articles/tensor-creation.html b/dev/articles/tensor-creation.html index cef2220b74..91aab50022 100644 --- a/dev/articles/tensor-creation.html +++ b/dev/articles/tensor-creation.html @@ -182,11 +182,11 @@

Using creation functionsx <- torch_randn(5, 3) x #> torch_tensor -#> -0.8838 -0.0212 -0.4739 -#> 0.3354 -3.1363 -0.9452 -#> 0.0442 -3.2052 0.0314 -#> -0.1844 0.8770 0.3634 -#> -1.6747 -0.7031 -0.1574 +#> 0.2564 -0.5892 -1.0000 +#> 0.3702 0.3249 -0.3600 +#> 0.3793 -0.8845 -2.2613 +#> -0.6170 0.3797 1.5659 +#> -0.0628 0.6299 0.1264 #> [ CPUFloatType{5,3} ]

Another example is torch_ones, which creates a tensor filled with ones.

diff --git a/dev/articles/torchscript.html b/dev/articles/torchscript.html index 1a4de7565b..efedd57bd9 100644 --- a/dev/articles/torchscript.html +++ b/dev/articles/torchscript.html @@ -157,9 +157,9 @@

Tracing
 traced_fn(torch_randn(3))
 #> torch_tensor
+#>  2.1653
 #>  0.0000
-#>  0.0000
-#>  0.5605
+#>  0.3021
 #> [ CPUFloatType{3} ]

It’s also possible to trace nn_modules() defined in R, for example:

@@ -185,9 +185,9 @@

Tracing
 traced_module(torch_randn(3, 10))
 #> torch_tensor
-#>  0.3669
-#>  0.3222
-#>  0.4798
+#> -0.3578
+#> -0.1359
+#> -0.1780
 #> [ CPUFloatType{3,1} ][ grad_fn = <AddmmBackward0> ]

Limitations of tracing @@ -226,16 +226,16 @@

Limitations of tracingtraced_dropout(torch_ones(3,3)) #> torch_tensor #> 2 2 2 -#> 0 0 0 +#> 0 2 2 #> 2 2 2 #> [ CPUFloatType{3,3} ] traced_dropout$eval() # even after setting to eval mode, dropout is applied traced_dropout(torch_ones(3,3)) #> torch_tensor -#> 0 0 0 -#> 0 2 0 -#> 2 2 2 +#> 0 2 2 +#> 0 0 2 +#> 2 0 0 #> [ CPUFloatType{3,3} ]

  1. Tracing proegrams can only take tensors and lists of tensors as @@ -248,69 +248,69 @@

    Limitations of tracingjit_trace(fn, torch_tensor(1), 1) #> Error in cpp_trace_function(tr_fn, list(...), .compilation_unit, strict, : Only tensors or (possibly nested) dict or tuples of tensors can be inputs to traced functions. Got float #> Exception raised from addInput at /Users/runner/work/libtorch-mac-m1/libtorch-mac-m1/pytorch/torch/csrc/jit/frontend/tracer.cpp:422 (most recent call first): -#> frame #0: std::__1::shared_ptr<c10::(anonymous namespace)::PyTorchStyleBacktrace> std::__1::make_shared[abi:ue170006]<c10::(anonymous namespace)::PyTorchStyleBacktrace, c10::SourceLocation&, void>(c10::SourceLocation&) + 121 (0x10888e639 in libc10.dylib) -#> frame #1: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 54 (0x10888e776 in libc10.dylib) -#> frame #2: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 149 (0x10888b035 in libc10.dylib) -#> frame #3: torch::jit::tracer::addInput(std::__1::shared_ptr<torch::jit::tracer::TracingState> const&, c10::IValue const&, c10::Type::SingletonOrSharedTypePtr<c10::Type> const&, torch::jit::Value*) + 6225 (0x11fe25cf1 in libtorch_cpu.dylib) -#> frame #4: torch::jit::tracer::addInput(std::__1::shared_ptr<torch::jit::tracer::TracingState> const&, c10::IValue const&, c10::Type::SingletonOrSharedTypePtr<c10::Type> const&, torch::jit::Value*) + 4799 (0x11fe2575f in libtorch_cpu.dylib) -#> frame #5: torch::jit::tracer::trace(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue>>, std::__1::function<std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue>> (std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue>>)> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (at::Tensor const&)>, bool, bool, torch::jit::Module*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) + 666 (0x11fe22eaa in libtorch_cpu.dylib) -#> frame #6: _lantern_trace_fn + 360 (0x10d4c94c8 in liblantern.dylib) -#> frame #7: cpp_trace_function(Rcpp::Function_Impl<Rcpp::PreserveStorage>, XPtrTorchStack, XPtrTorchCompilationUnit, XPtrTorchstring, bool, XPtrTorchScriptModule, bool, bool) + 566 (0x10b73ef36 in torchpkg.so) -#> frame #8: _torch_cpp_trace_function + 719 (0x10b55c3cf in torchpkg.so) -#> frame #9: R_doDotCall + 13245 (0x105c7f4bd in libR.dylib) -#> frame #10: bcEval_loop + 146595 (0x105ce7123 in libR.dylib) -#> frame #11: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #12: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #13: R_execClosure + 761 (0x105cb7039 in libR.dylib) -#> frame #14: applyClosure_core + 128 (0x105cb6140 in libR.dylib) -#> frame #15: Rf_eval + 1189 (0x105cb47a5 in libR.dylib) -#> frame #16: do_eval + 1253 (0x105cbbb65 in libR.dylib) -#> frame #17: bcEval_loop + 44444 (0x105cce21c in libR.dylib) -#> frame #18: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #19: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #20: forcePromise + 230 (0x105cb5026 in libR.dylib) -#> frame #21: Rf_eval + 634 (0x105cb457a in libR.dylib) -#> frame #22: do_withVisible + 57 (0x105cbbef9 in libR.dylib) -#> frame #23: do_internal + 362 (0x105d33b6a in libR.dylib) -#> frame #24: bcEval_loop + 45071 (0x105cce48f in libR.dylib) -#> frame #25: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #26: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #27: forcePromise + 230 (0x105cb5026 in libR.dylib) -#> frame #28: Rf_eval + 634 (0x105cb457a in libR.dylib) -#> frame #29: forcePromise + 230 (0x105cb5026 in libR.dylib) -#> frame #30: bcEval_loop + 19464 (0x105cc8088 in libR.dylib) -#> frame #31: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #32: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #33: R_execClosure + 761 (0x105cb7039 in libR.dylib) -#> frame #34: applyClosure_core + 128 (0x105cb6140 in libR.dylib) -#> frame #35: Rf_eval + 1189 (0x105cb47a5 in libR.dylib) -#> frame #36: do_eval + 1253 (0x105cbbb65 in libR.dylib) -#> frame #37: bcEval_loop + 44444 (0x105cce21c in libR.dylib) -#> frame #38: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #39: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #40: R_execClosure + 761 (0x105cb7039 in libR.dylib) -#> frame #41: applyClosure_core + 128 (0x105cb6140 in libR.dylib) -#> frame #42: Rf_eval + 1189 (0x105cb47a5 in libR.dylib) -#> frame #43: do_begin + 429 (0x105cb9a2d in libR.dylib) -#> frame #44: Rf_eval + 990 (0x105cb46de in libR.dylib) -#> frame #45: R_execClosure + 761 (0x105cb7039 in libR.dylib) -#> frame #46: applyClosure_core + 128 (0x105cb6140 in libR.dylib) -#> frame #47: Rf_eval + 1189 (0x105cb47a5 in libR.dylib) -#> frame #48: do_docall + 615 (0x105c452a7 in libR.dylib) -#> frame #49: bcEval_loop + 44444 (0x105cce21c in libR.dylib) -#> frame #50: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #51: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #52: R_execClosure + 761 (0x105cb7039 in libR.dylib) -#> frame #53: applyClosure_core + 128 (0x105cb6140 in libR.dylib) -#> frame #54: Rf_eval + 1189 (0x105cb47a5 in libR.dylib) -#> frame #55: do_docall + 615 (0x105c452a7 in libR.dylib) -#> frame #56: bcEval_loop + 44444 (0x105cce21c in libR.dylib) -#> frame #57: bcEval + 628 (0x105cb4df4 in libR.dylib) -#> frame #58: Rf_eval + 506 (0x105cb44fa in libR.dylib) -#> frame #59: R_execClosure + 761 (0x105cb7039 in libR.dylib) -#> frame #60: applyClosure_core + 128 (0x105cb6140 in libR.dylib) -#> frame #61: Rf_eval + 1189 (0x105cb47a5 in libR.dylib) -#> frame #62: forcePromise + 230 (0x105cb5026 in libR.dylib) +#> frame #0: std::__1::shared_ptr<c10::(anonymous namespace)::PyTorchStyleBacktrace> std::__1::make_shared[abi:ue170006]<c10::(anonymous namespace)::PyTorchStyleBacktrace, c10::SourceLocation&, void>(c10::SourceLocation&) + 121 (0x10c363639 in libc10.dylib) +#> frame #1: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 54 (0x10c363776 in libc10.dylib) +#> frame #2: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 149 (0x10c360035 in libc10.dylib) +#> frame #3: torch::jit::tracer::addInput(std::__1::shared_ptr<torch::jit::tracer::TracingState> const&, c10::IValue const&, c10::Type::SingletonOrSharedTypePtr<c10::Type> const&, torch::jit::Value*) + 6225 (0x1238facf1 in libtorch_cpu.dylib) +#> frame #4: torch::jit::tracer::addInput(std::__1::shared_ptr<torch::jit::tracer::TracingState> const&, c10::IValue const&, c10::Type::SingletonOrSharedTypePtr<c10::Type> const&, torch::jit::Value*) + 4799 (0x1238fa75f in libtorch_cpu.dylib) +#> frame #5: torch::jit::tracer::trace(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue>>, std::__1::function<std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue>> (std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue>>)> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (at::Tensor const&)>, bool, bool, torch::jit::Module*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) + 666 (0x1238f7eaa in libtorch_cpu.dylib) +#> frame #6: _lantern_trace_fn + 360 (0x110f9e4c8 in liblantern.dylib) +#> frame #7: cpp_trace_function(Rcpp::Function_Impl<Rcpp::PreserveStorage>, XPtrTorchStack, XPtrTorchCompilationUnit, XPtrTorchstring, bool, XPtrTorchScriptModule, bool, bool) + 566 (0x10f213f36 in torchpkg.so) +#> frame #8: _torch_cpp_trace_function + 719 (0x10f0313cf in torchpkg.so) +#> frame #9: R_doDotCall + 13245 (0x1097544bd in libR.dylib) +#> frame #10: bcEval_loop + 146595 (0x1097bc123 in libR.dylib) +#> frame #11: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #12: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #13: R_execClosure + 761 (0x10978c039 in libR.dylib) +#> frame #14: applyClosure_core + 128 (0x10978b140 in libR.dylib) +#> frame #15: Rf_eval + 1189 (0x1097897a5 in libR.dylib) +#> frame #16: do_eval + 1253 (0x109790b65 in libR.dylib) +#> frame #17: bcEval_loop + 44444 (0x1097a321c in libR.dylib) +#> frame #18: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #19: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #20: forcePromise + 230 (0x10978a026 in libR.dylib) +#> frame #21: Rf_eval + 634 (0x10978957a in libR.dylib) +#> frame #22: do_withVisible + 57 (0x109790ef9 in libR.dylib) +#> frame #23: do_internal + 362 (0x109808b6a in libR.dylib) +#> frame #24: bcEval_loop + 45071 (0x1097a348f in libR.dylib) +#> frame #25: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #26: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #27: forcePromise + 230 (0x10978a026 in libR.dylib) +#> frame #28: Rf_eval + 634 (0x10978957a in libR.dylib) +#> frame #29: forcePromise + 230 (0x10978a026 in libR.dylib) +#> frame #30: bcEval_loop + 19464 (0x10979d088 in libR.dylib) +#> frame #31: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #32: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #33: R_execClosure + 761 (0x10978c039 in libR.dylib) +#> frame #34: applyClosure_core + 128 (0x10978b140 in libR.dylib) +#> frame #35: Rf_eval + 1189 (0x1097897a5 in libR.dylib) +#> frame #36: do_eval + 1253 (0x109790b65 in libR.dylib) +#> frame #37: bcEval_loop + 44444 (0x1097a321c in libR.dylib) +#> frame #38: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #39: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #40: R_execClosure + 761 (0x10978c039 in libR.dylib) +#> frame #41: applyClosure_core + 128 (0x10978b140 in libR.dylib) +#> frame #42: Rf_eval + 1189 (0x1097897a5 in libR.dylib) +#> frame #43: do_begin + 429 (0x10978ea2d in libR.dylib) +#> frame #44: Rf_eval + 990 (0x1097896de in libR.dylib) +#> frame #45: R_execClosure + 761 (0x10978c039 in libR.dylib) +#> frame #46: applyClosure_core + 128 (0x10978b140 in libR.dylib) +#> frame #47: Rf_eval + 1189 (0x1097897a5 in libR.dylib) +#> frame #48: do_docall + 615 (0x10971a2a7 in libR.dylib) +#> frame #49: bcEval_loop + 44444 (0x1097a321c in libR.dylib) +#> frame #50: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #51: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #52: R_execClosure + 761 (0x10978c039 in libR.dylib) +#> frame #53: applyClosure_core + 128 (0x10978b140 in libR.dylib) +#> frame #54: Rf_eval + 1189 (0x1097897a5 in libR.dylib) +#> frame #55: do_docall + 615 (0x10971a2a7 in libR.dylib) +#> frame #56: bcEval_loop + 44444 (0x1097a321c in libR.dylib) +#> frame #57: bcEval + 628 (0x109789df4 in libR.dylib) +#> frame #58: Rf_eval + 506 (0x1097894fa in libR.dylib) +#> frame #59: R_execClosure + 761 (0x10978c039 in libR.dylib) +#> frame #60: applyClosure_core + 128 (0x10978b140 in libR.dylib) +#> frame #61: Rf_eval + 1189 (0x1097897a5 in libR.dylib) +#> frame #62: forcePromise + 230 (0x10978a026 in libR.dylib) #> : diff --git a/dev/articles/using-autograd.html b/dev/articles/using-autograd.html index 52bbeccbeb..d11e85f78b 100644 --- a/dev/articles/using-autograd.html +++ b/dev/articles/using-autograd.html @@ -284,26 +284,26 @@

    The simple network, now using aut }) } -#> 10 11.65239 -#> 20 11.25313 -#> 30 10.88229 -#> 40 10.53758 -#> 50 10.2167 -#> 60 9.917249 -#> 70 9.636954 -#> 80 9.375286 -#> 90 9.130717 -#> 100 8.901865 -#> 110 8.68799 -#> 120 8.487749 -#> 130 8.299764 -#> 140 8.1231 -#> 150 7.957112 -#> 160 7.801844 -#> 170 7.655412 -#> 180 7.517128 -#> 190 7.386353 -#> 200 7.262533 +#> 10 15.85854 +#> 20 15.13788 +#> 30 14.48078 +#> 40 13.8814 +#> 50 13.33312 +#> 60 12.83131 +#> 70 12.37022 +#> 80 11.94701 +#> 90 11.55653 +#> 100 11.19764 +#> 110 10.8674 +#> 120 10.56314 +#> 130 10.28249 +#> 140 10.02329 +#> 150 9.783608 +#> 160 9.561694 +#> 170 9.355968 +#> 180 9.165007 +#> 190 8.987517 +#> 200 8.822281

    We still manually compute the forward pass, and we still manually update the weights. In the last two chapters of this section, we’ll see how these parts of the logic can be made more modular and reusable, as diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 9435834ca6..1351c8ac90 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -20,7 +20,7 @@ articles: tensor-creation: tensor-creation.html torchscript: torchscript.html using-autograd: using-autograd.html -last_built: 2025-01-16T22:20Z +last_built: 2025-01-17T13:48Z urls: reference: https://torch.mlverse.org/docs/reference article: https://torch.mlverse.org/docs/articles diff --git a/dev/reference/distr_bernoulli.html b/dev/reference/distr_bernoulli.html index d0db7aa251..e79072920d 100644 --- a/dev/reference/distr_bernoulli.html +++ b/dev/reference/distr_bernoulli.html @@ -118,7 +118,7 @@

    Examplesm$sample() # 30% chance 1; 70% chance 0 } #> torch_tensor -#> 0 +#> 1 #> [ CPUFloatType{1} ] diff --git a/dev/reference/distr_gamma.html b/dev/reference/distr_gamma.html index e564c8131a..21e0860dd5 100644 --- a/dev/reference/distr_gamma.html +++ b/dev/reference/distr_gamma.html @@ -111,7 +111,7 @@

    Examplesm$sample() # Gamma distributed with concentration=1 and rate=1 } #> torch_tensor -#> 2.2418 +#> 0.3918 #> [ CPUFloatType{1} ] diff --git a/dev/reference/distr_multivariate_normal.html b/dev/reference/distr_multivariate_normal.html index aa8275eacd..48d887a6a4 100644 --- a/dev/reference/distr_multivariate_normal.html +++ b/dev/reference/distr_multivariate_normal.html @@ -145,8 +145,8 @@

    Examplesm$sample() # normally distributed with mean=`[0,0]` and covariance_matrix=`I` } #> torch_tensor -#> 0.1960 -#> 0.8528 +#> -1.3316 +#> -1.9537 #> [ CPUFloatType{2} ] diff --git a/dev/reference/distr_normal.html b/dev/reference/distr_normal.html index b24d1d261d..49b7b24817 100644 --- a/dev/reference/distr_normal.html +++ b/dev/reference/distr_normal.html @@ -116,7 +116,7 @@

    Examplesm$sample() # normally distributed with loc=0 and scale=1 } #> torch_tensor -#> -0.2788 +#> -0.6225 #> [ CPUFloatType{1} ] diff --git a/dev/reference/distr_poisson.html b/dev/reference/distr_poisson.html index 7deb16d3bc..44426b47c1 100644 --- a/dev/reference/distr_poisson.html +++ b/dev/reference/distr_poisson.html @@ -114,7 +114,7 @@

    Examplesm$sample() } #> torch_tensor -#> 3 +#> 1 #> [ CPUFloatType{1} ] diff --git a/dev/reference/jit_compile.html b/dev/reference/jit_compile.html index 1e4f3bf7b9..c61d03e097 100644 --- a/dev/reference/jit_compile.html +++ b/dev/reference/jit_compile.html @@ -103,7 +103,7 @@

    Examplescomp$foo(torch_randn(10)) } #> torch_tensor -#> 1.18279 +#> 3.20453 #> [ CPUFloatType{} ] diff --git a/dev/reference/linalg_cholesky_ex.html b/dev/reference/linalg_cholesky_ex.html index 7a4c3fbf50..2275f58bb5 100644 --- a/dev/reference/linalg_cholesky_ex.html +++ b/dev/reference/linalg_cholesky_ex.html @@ -178,13 +178,13 @@

    Examples} #> $L #> torch_tensor -#> -0.3534 0.0000 -#> -0.6198 -0.5223 +#> 0.4310 0.0000 +#> -1.0396 -0.7874 #> [ CPUFloatType{2,2} ] #> #> $info #> torch_tensor -#> 1 +#> 2 #> [ CPUIntType{} ] #> diff --git a/dev/reference/linalg_det.html b/dev/reference/linalg_det.html index bc82819f68..95b3dd8427 100644 --- a/dev/reference/linalg_det.html +++ b/dev/reference/linalg_det.html @@ -129,9 +129,9 @@

    Exampleslinalg_det(a) } #> torch_tensor -#> -2.2765 -#> -4.0421 -#> -0.9786 +#> 3.3494 +#> 0.3701 +#> 0.5493 #> [ CPUFloatType{3} ] diff --git a/dev/reference/linalg_eigh.html b/dev/reference/linalg_eigh.html index 34eeab10b2..23e2e56e6d 100644 --- a/dev/reference/linalg_eigh.html +++ b/dev/reference/linalg_eigh.html @@ -192,14 +192,14 @@

    Examples} #> [[1]] #> torch_tensor -#> -1.1180 -#> 1.5193 +#> -1.1962 +#> 0.6748 #> [ CPUFloatType{2} ] #> #> [[2]] #> torch_tensor -#> -0.8755 0.4832 -#> 0.4832 0.8755 +#> -0.9894 -0.1452 +#> 0.1452 -0.9894 #> [ CPUFloatType{2,2} ] #> diff --git a/dev/reference/linalg_eigvalsh.html b/dev/reference/linalg_eigvalsh.html index 24a516741d..b0d6715456 100644 --- a/dev/reference/linalg_eigvalsh.html +++ b/dev/reference/linalg_eigvalsh.html @@ -153,8 +153,8 @@

    Exampleslinalg_eigvalsh(a) } #> torch_tensor -#> -1.4655 -#> 0.4388 +#> -1.5890 +#> 0.5516 #> [ CPUFloatType{2} ] diff --git a/dev/reference/linalg_inv.html b/dev/reference/linalg_inv.html index c0ca1b0cbf..04dfb5160d 100644 --- a/dev/reference/linalg_inv.html +++ b/dev/reference/linalg_inv.html @@ -144,10 +144,10 @@

    Exampleslinalg_inv(A) } #> torch_tensor -#> -0.3042 -0.1217 0.1224 0.2468 -#> 0.1410 -0.0273 0.4258 -0.1984 -#> 0.3120 -1.9151 0.4014 -1.2457 -#> 0.8951 -2.1092 1.0920 -0.9072 +#> 0.1537 0.5638 -0.6458 0.1002 +#> -1.7045 0.8630 -0.0541 -0.8210 +#> -1.0503 1.1342 0.5290 -0.9613 +#> 0.0008 -0.0693 0.2358 0.3296 #> [ CPUFloatType{4,4} ] diff --git a/dev/reference/linalg_pinv.html b/dev/reference/linalg_pinv.html index fdfcb29d39..a885737e9c 100644 --- a/dev/reference/linalg_pinv.html +++ b/dev/reference/linalg_pinv.html @@ -177,11 +177,11 @@

    Exampleslinalg_pinv(A) } #> torch_tensor -#> 0.2778 0.0223 0.1512 -#> -0.3717 0.2018 -0.3854 -#> -0.3909 0.2323 -0.2108 -#> -0.3408 -0.0237 -0.3322 -#> -0.2952 -0.0871 0.1703 +#> -0.0708 0.2014 -0.3848 +#> 0.5560 -0.2573 0.1653 +#> 0.1588 -0.1293 0.2596 +#> -0.1385 -0.2781 -0.0560 +#> -0.0117 -0.1085 0.0917 #> [ CPUFloatType{5,3} ] diff --git a/dev/reference/linalg_slogdet.html b/dev/reference/linalg_slogdet.html index 294fdf9d5f..ff03d157b3 100644 --- a/dev/reference/linalg_slogdet.html +++ b/dev/reference/linalg_slogdet.html @@ -151,7 +151,7 @@

    Examples#> #> [[2]] #> torch_tensor -#> 0.725046 +#> 1.19178 #> [ CPUFloatType{} ] #> diff --git a/dev/reference/linalg_solve.html b/dev/reference/linalg_solve.html index f5502f2889..dfa7650586 100644 --- a/dev/reference/linalg_solve.html +++ b/dev/reference/linalg_solve.html @@ -154,7 +154,7 @@

    Examplesx <- linalg_solve(A, b) torch_allclose(torch_matmul(A, x), b) } -#> [1] FALSE +#> [1] TRUE