From b7cb41d51353e894a61810a79c7378390ca6fe8d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 21 Jan 2025 20:43:10 +0000 Subject: [PATCH] Built site for torch@0.13.0.9001: 94437bb --- dev/articles/examples/basic-nn-module.html | 32 ++-- dev/articles/indexing.html | 22 +-- dev/articles/loading-data.html | 2 +- dev/articles/tensor-creation.html | 10 +- dev/articles/torchscript.html | 146 +++++++++---------- dev/articles/using-autograd.html | 40 ++--- dev/pkgdown.yml | 2 +- dev/reference/distr_gamma.html | 2 +- dev/reference/distr_multivariate_normal.html | 4 +- dev/reference/distr_normal.html | 2 +- dev/reference/jit_compile.html | 2 +- dev/reference/linalg_cholesky_ex.html | 6 +- dev/reference/linalg_det.html | 6 +- dev/reference/linalg_eigh.html | 8 +- dev/reference/linalg_eigvalsh.html | 4 +- dev/reference/linalg_inv.html | 8 +- dev/reference/linalg_pinv.html | 10 +- dev/reference/linalg_slogdet.html | 2 +- dev/reference/linalg_svd.html | 22 +-- dev/reference/linalg_svdvals.html | 6 +- dev/reference/linalg_tensorsolve.html | 2 +- dev/reference/nn_avg_pool1d.html | 2 +- dev/reference/nn_embedding.html | 4 +- dev/reference/nn_flatten.html | 60 ++++---- dev/reference/nn_init_kaiming_normal_.html | 6 +- dev/reference/nn_init_kaiming_uniform_.html | 6 +- dev/reference/nn_init_normal_.html | 6 +- dev/reference/nn_init_orthogonal_.html | 6 +- dev/reference/nn_init_trunc_normal_.html | 6 +- dev/reference/nn_init_uniform_.html | 6 +- dev/reference/nn_init_xavier_normal_.html | 6 +- dev/reference/nn_init_xavier_uniform_.html | 6 +- dev/reference/nn_max_unpool2d.html | 8 +- dev/reference/nn_relu.html | 3 +- dev/reference/nn_rnn.html | 78 +++++----- dev/reference/nn_rrelu.html | 4 +- dev/reference/slc.html | 6 +- dev/reference/torch_acos.html | 8 +- dev/reference/torch_acosh.html | 8 +- dev/reference/torch_add.html | 8 +- dev/reference/torch_addbmm.html | 6 +- dev/reference/torch_addcdiv.html | 6 +- dev/reference/torch_addcmul.html | 6 +- dev/reference/torch_addmm.html | 4 +- dev/reference/torch_addmv.html | 4 +- dev/reference/torch_amax.html | 8 +- dev/reference/torch_amin.html | 8 +- dev/reference/torch_argmax.html | 4 +- dev/reference/torch_argmin.html | 4 +- dev/reference/torch_argsort.html | 8 +- dev/reference/torch_as_strided.html | 4 +- dev/reference/torch_asin.html | 6 +- dev/reference/torch_asinh.html | 8 +- dev/reference/torch_atan.html | 8 +- dev/reference/torch_atan2.html | 8 +- dev/reference/torch_atanh.html | 8 +- dev/reference/torch_baddbmm.html | 36 ++--- dev/reference/torch_bincount.html | 7 +- dev/reference/torch_bmm.html | 36 ++--- dev/reference/torch_cat.html | 4 +- dev/reference/torch_ceil.html | 6 +- dev/reference/torch_chain_matmul.html | 6 +- dev/reference/torch_channel_shuffle.html | 32 ++-- dev/reference/torch_cholesky_solve.html | 6 +- dev/reference/torch_clamp.html | 8 +- dev/reference/torch_conv1d.html | 58 ++++---- dev/reference/torch_conv2d.html | 42 +++--- dev/reference/torch_conv_transpose1d.html | 58 ++++---- dev/reference/torch_conv_transpose2d.html | 42 +++--- dev/reference/torch_cos.html | 8 +- dev/reference/torch_cosh.html | 8 +- dev/reference/torch_cosine_similarity.html | 60 ++++---- dev/reference/torch_count_nonzero.html | 4 +- dev/reference/torch_cross.html | 8 +- dev/reference/torch_cummax.html | 38 ++--- dev/reference/torch_cummin.html | 36 ++--- dev/reference/torch_cumprod.html | 21 ++- dev/reference/torch_cumsum.html | 20 +-- dev/reference/torch_det.html | 6 +- dev/reference/torch_diag_embed.html | 12 +- dev/reference/torch_diagflat.html | 8 +- dev/reference/torch_diagonal.html | 18 +-- dev/reference/torch_dist.html | 2 +- dev/reference/torch_div.html | 8 +- dev/reference/torch_floor.html | 4 +- dev/reference/torch_index_select.html | 6 +- dev/reference/torch_log.html | 4 +- dev/reference/torch_log10.html | 8 +- dev/reference/torch_log1p.html | 8 +- dev/reference/torch_log2.html | 10 +- dev/reference/torch_logcumsumexp.html | 20 +-- dev/reference/torch_logdet.html | 2 +- dev/reference/torch_logit.html | 10 +- dev/reference/torch_logsumexp.html | 6 +- dev/reference/torch_lu.html | 14 +- dev/reference/torch_lu_solve.html | 2 +- dev/reference/torch_masked_select.html | 6 +- dev/reference/torch_matmul.html | 36 ++--- dev/reference/torch_matrix_power.html | 9 +- dev/reference/torch_max.html | 8 +- dev/reference/torch_mean.html | 2 +- dev/reference/torch_median.html | 14 +- dev/reference/torch_min.html | 8 +- dev/reference/torch_mm.html | 4 +- dev/reference/torch_mode.html | 4 +- dev/reference/torch_movedim.html | 4 +- dev/reference/torch_mul.html | 8 +- dev/reference/torch_multinomial.html | 2 +- dev/reference/torch_mv.html | 4 +- dev/reference/torch_mvlgamma.html | 4 +- dev/reference/torch_neg.html | 10 +- dev/reference/torch_normal.html | 2 +- dev/reference/torch_pinverse.html | 12 +- dev/reference/torch_poisson.html | 8 +- dev/reference/torch_prod.html | 5 +- dev/reference/torch_rand.html | 4 +- dev/reference/torch_randint.html | 4 +- dev/reference/torch_randn.html | 4 +- dev/reference/torch_reciprocal.html | 8 +- dev/reference/torch_round.html | 6 +- dev/reference/torch_rsqrt.html | 8 +- dev/reference/torch_sigmoid.html | 8 +- dev/reference/torch_sin.html | 8 +- dev/reference/torch_sinh.html | 8 +- dev/reference/torch_slogdet.html | 2 +- dev/reference/torch_sort.html | 12 +- dev/reference/torch_sqrt.html | 6 +- dev/reference/torch_square.html | 8 +- dev/reference/torch_std.html | 8 +- dev/reference/torch_std_mean.html | 16 +- dev/reference/torch_svd.html | 2 +- dev/reference/torch_t.html | 6 +- dev/reference/torch_tan.html | 8 +- dev/reference/torch_tanh.html | 8 +- dev/reference/torch_transpose.html | 6 +- dev/reference/torch_trapz.html | 4 +- dev/reference/torch_triangular_solve.html | 8 +- dev/reference/torch_tril.html | 6 +- dev/reference/torch_triu.html | 8 +- dev/reference/torch_trunc.html | 8 +- dev/reference/torch_var.html | 8 +- dev/reference/torch_var_mean.html | 16 +- dev/reference/with_detect_anomaly.html | 42 +++--- dev/search.json | 2 +- 144 files changed, 880 insertions(+), 879 deletions(-) diff --git a/dev/articles/examples/basic-nn-module.html b/dev/articles/examples/basic-nn-module.html index f6e9ad1cbc..cc3cb20100 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.8666
-## -1.6154
-## -0.2515
+##  0.1571
+## -0.4497
+##  0.6261
 ## [ CPUFloatType{3,1} ][ requires_grad = TRUE ]
 ## 
 ## $b
@@ -146,9 +146,9 @@ 

basic-nn-module

# or individually model$w
## torch_tensor
-## -0.8666
-## -1.6154
-## -0.2515
+##  0.1571
+## -0.4497
+##  0.6261
 ## [ CPUFloatType{3,1} ][ requires_grad = TRUE ]
 model$b
@@ -163,16 +163,16 @@

basic-nn-module

 y_pred
## torch_tensor
-##  1.3638
-##  3.7643
-##  2.0929
-##  1.3960
-## -4.7317
-##  0.0139
-## -1.6080
-##  1.9066
-## -1.3871
-##  4.1967
+## -0.9991
+## -0.4384
+##  1.0320
+## -0.8622
+##  1.9835
+##  0.1517
+##  0.5564
+##  0.8829
+## -1.4770
+##  0.0957
 ## [ CPUFloatType{10,1} ][ grad_fn = <AddBackward0> ]
diff --git a/dev/articles/indexing.html b/dev/articles/indexing.html index 96b1d5d94f..6cbd62c860 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.9774 0.6581 -1.2705 -#> 0.9108 0.8746 -2.2058 +#> 1.2514 3.0536 -1.2668 +#> -0.9527 -0.1414 -0.1013 #> [ CPUFloatType{2,3} ]

The following syntax will give you the first row:

 x[1,]
 #> torch_tensor
-#> -0.9774
-#>  0.6581
-#> -1.2705
+#>  1.2514
+#>  3.0536
+#> -1.2668
 #> [ CPUFloatType{3} ]

And this would give you the first 2 columns:

 x[,1:2]
 #> torch_tensor
-#> -0.9774  0.6581
-#>  0.9108  0.8746
+#>  1.2514  3.0536
+#> -0.9527 -0.1414
 #> [ CPUFloatType{2,2} ]
@@ -339,15 +339,15 @@

Indexing with vectorsx <- torch_randn(4,4) x[c(1,3), c(1,3)] #> torch_tensor -#> -0.7239 0.3543 -#> 0.2118 -0.2658 +#> -0.3682 -0.4853 +#> -2.0325 0.6320 #> [ CPUFloatType{2,2} ]

You can also use boolean vectors, for example:

 x[c(TRUE, FALSE, TRUE, FALSE), c(TRUE, FALSE, TRUE, FALSE)]
 #> torch_tensor
-#> -0.7239  0.3543
-#>  0.2118 -0.2658
+#> -0.3682 -0.4853
+#> -2.0325  0.6320
 #> [ 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 6c01a6800a..d584e80266 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: 681.988381 +#> Loss at epoch 1: 39.895986 #> 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 4c6620c8da..5ebe677da5 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 -#> -1.6946 0.4957 -0.0285 -#> -0.3956 1.0301 -2.2694 -#> -0.0321 0.9659 0.7460 -#> 0.3207 -1.2769 -1.2060 -#> 0.3981 0.4001 0.8095 +#> -1.1399 -0.2487 1.0279 +#> -1.6340 0.2784 0.2828 +#> 0.5156 -0.5742 0.2476 +#> 1.6639 0.6689 -0.4808 +#> -2.0140 -0.8206 0.9142 #> [ 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 98ac1019ab..4293f0d212 100644 --- a/dev/articles/torchscript.html +++ b/dev/articles/torchscript.html @@ -157,9 +157,9 @@

Tracing
 traced_fn(torch_randn(3))
 #> torch_tensor
+#>  0.1195
+#>  2.0253
 #>  0.0000
-#>  0.0000
-#>  0.4806
 #> [ 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.2074
-#>  0.2896
-#>  0.2279
+#> -0.3026
+#>  0.0974
+#>  0.1498
 #> [ CPUFloatType{3,1} ][ grad_fn = <AddmmBackward0> ]

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

Limitations of tracingtraced_dropout <- jit_trace(nn_dropout(), torch_ones(5,5)) traced_dropout(torch_ones(3,3)) #> torch_tensor -#> 2 2 0 -#> 2 0 0 -#> 2 2 2 +#> 0 0 2 +#> 0 0 0 +#> 0 0 0 #> [ 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 2 -#> 2 2 2 +#> 0 0 0 +#> 0 2 0 #> 2 0 0 #> [ CPUFloatType{3,3} ]

    @@ -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 (0x110d05639 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 (0x110d05776 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 (0x110d02035 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 (0x1282cccf1 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 (0x1282cc75f 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 (0x1282c9eaa in libtorch_cpu.dylib) -#> frame #6: _lantern_trace_fn + 360 (0x115955798 in liblantern.dylib) -#> frame #7: cpp_trace_function(Rcpp::Function_Impl<Rcpp::PreserveStorage>, XPtrTorchStack, XPtrTorchCompilationUnit, XPtrTorchstring, bool, XPtrTorchScriptModule, bool, bool) + 566 (0x113bb5f36 in torchpkg.so) -#> frame #8: _torch_cpp_trace_function + 719 (0x1139d33cf in torchpkg.so) -#> frame #9: R_doDotCall + 13245 (0x10e0f64bd in libR.dylib) -#> frame #10: bcEval_loop + 146595 (0x10e15e123 in libR.dylib) -#> frame #11: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #12: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #13: R_execClosure + 761 (0x10e12e039 in libR.dylib) -#> frame #14: applyClosure_core + 128 (0x10e12d140 in libR.dylib) -#> frame #15: Rf_eval + 1189 (0x10e12b7a5 in libR.dylib) -#> frame #16: do_eval + 1253 (0x10e132b65 in libR.dylib) -#> frame #17: bcEval_loop + 44444 (0x10e14521c in libR.dylib) -#> frame #18: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #19: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #20: forcePromise + 230 (0x10e12c026 in libR.dylib) -#> frame #21: Rf_eval + 634 (0x10e12b57a in libR.dylib) -#> frame #22: do_withVisible + 57 (0x10e132ef9 in libR.dylib) -#> frame #23: do_internal + 362 (0x10e1aab6a in libR.dylib) -#> frame #24: bcEval_loop + 45071 (0x10e14548f in libR.dylib) -#> frame #25: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #26: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #27: forcePromise + 230 (0x10e12c026 in libR.dylib) -#> frame #28: Rf_eval + 634 (0x10e12b57a in libR.dylib) -#> frame #29: forcePromise + 230 (0x10e12c026 in libR.dylib) -#> frame #30: bcEval_loop + 19464 (0x10e13f088 in libR.dylib) -#> frame #31: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #32: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #33: R_execClosure + 761 (0x10e12e039 in libR.dylib) -#> frame #34: applyClosure_core + 128 (0x10e12d140 in libR.dylib) -#> frame #35: Rf_eval + 1189 (0x10e12b7a5 in libR.dylib) -#> frame #36: do_eval + 1253 (0x10e132b65 in libR.dylib) -#> frame #37: bcEval_loop + 44444 (0x10e14521c in libR.dylib) -#> frame #38: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #39: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #40: R_execClosure + 761 (0x10e12e039 in libR.dylib) -#> frame #41: applyClosure_core + 128 (0x10e12d140 in libR.dylib) -#> frame #42: Rf_eval + 1189 (0x10e12b7a5 in libR.dylib) -#> frame #43: do_begin + 429 (0x10e130a2d in libR.dylib) -#> frame #44: Rf_eval + 990 (0x10e12b6de in libR.dylib) -#> frame #45: R_execClosure + 761 (0x10e12e039 in libR.dylib) -#> frame #46: applyClosure_core + 128 (0x10e12d140 in libR.dylib) -#> frame #47: Rf_eval + 1189 (0x10e12b7a5 in libR.dylib) -#> frame #48: do_docall + 615 (0x10e0bc2a7 in libR.dylib) -#> frame #49: bcEval_loop + 44444 (0x10e14521c in libR.dylib) -#> frame #50: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #51: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #52: R_execClosure + 761 (0x10e12e039 in libR.dylib) -#> frame #53: applyClosure_core + 128 (0x10e12d140 in libR.dylib) -#> frame #54: Rf_eval + 1189 (0x10e12b7a5 in libR.dylib) -#> frame #55: do_docall + 615 (0x10e0bc2a7 in libR.dylib) -#> frame #56: bcEval_loop + 44444 (0x10e14521c in libR.dylib) -#> frame #57: bcEval + 628 (0x10e12bdf4 in libR.dylib) -#> frame #58: Rf_eval + 506 (0x10e12b4fa in libR.dylib) -#> frame #59: R_execClosure + 761 (0x10e12e039 in libR.dylib) -#> frame #60: applyClosure_core + 128 (0x10e12d140 in libR.dylib) -#> frame #61: Rf_eval + 1189 (0x10e12b7a5 in libR.dylib) -#> frame #62: forcePromise + 230 (0x10e12c026 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 (0x104f5b639 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 (0x104f5b776 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 (0x104f58035 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 (0x11c522cf1 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 (0x11c52275f 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 (0x11c51feaa in libtorch_cpu.dylib) +#> frame #6: _lantern_trace_fn + 360 (0x109bab798 in liblantern.dylib) +#> frame #7: cpp_trace_function(Rcpp::Function_Impl<Rcpp::PreserveStorage>, XPtrTorchStack, XPtrTorchCompilationUnit, XPtrTorchstring, bool, XPtrTorchScriptModule, bool, bool) + 566 (0x107e0bf36 in torchpkg.so) +#> frame #8: _torch_cpp_trace_function + 719 (0x107c293cf in torchpkg.so) +#> frame #9: R_doDotCall + 13245 (0x10234c4bd in libR.dylib) +#> frame #10: bcEval_loop + 146595 (0x1023b4123 in libR.dylib) +#> frame #11: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #12: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #13: R_execClosure + 761 (0x102384039 in libR.dylib) +#> frame #14: applyClosure_core + 128 (0x102383140 in libR.dylib) +#> frame #15: Rf_eval + 1189 (0x1023817a5 in libR.dylib) +#> frame #16: do_eval + 1253 (0x102388b65 in libR.dylib) +#> frame #17: bcEval_loop + 44444 (0x10239b21c in libR.dylib) +#> frame #18: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #19: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #20: forcePromise + 230 (0x102382026 in libR.dylib) +#> frame #21: Rf_eval + 634 (0x10238157a in libR.dylib) +#> frame #22: do_withVisible + 57 (0x102388ef9 in libR.dylib) +#> frame #23: do_internal + 362 (0x102400b6a in libR.dylib) +#> frame #24: bcEval_loop + 45071 (0x10239b48f in libR.dylib) +#> frame #25: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #26: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #27: forcePromise + 230 (0x102382026 in libR.dylib) +#> frame #28: Rf_eval + 634 (0x10238157a in libR.dylib) +#> frame #29: forcePromise + 230 (0x102382026 in libR.dylib) +#> frame #30: bcEval_loop + 19464 (0x102395088 in libR.dylib) +#> frame #31: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #32: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #33: R_execClosure + 761 (0x102384039 in libR.dylib) +#> frame #34: applyClosure_core + 128 (0x102383140 in libR.dylib) +#> frame #35: Rf_eval + 1189 (0x1023817a5 in libR.dylib) +#> frame #36: do_eval + 1253 (0x102388b65 in libR.dylib) +#> frame #37: bcEval_loop + 44444 (0x10239b21c in libR.dylib) +#> frame #38: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #39: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #40: R_execClosure + 761 (0x102384039 in libR.dylib) +#> frame #41: applyClosure_core + 128 (0x102383140 in libR.dylib) +#> frame #42: Rf_eval + 1189 (0x1023817a5 in libR.dylib) +#> frame #43: do_begin + 429 (0x102386a2d in libR.dylib) +#> frame #44: Rf_eval + 990 (0x1023816de in libR.dylib) +#> frame #45: R_execClosure + 761 (0x102384039 in libR.dylib) +#> frame #46: applyClosure_core + 128 (0x102383140 in libR.dylib) +#> frame #47: Rf_eval + 1189 (0x1023817a5 in libR.dylib) +#> frame #48: do_docall + 615 (0x1023122a7 in libR.dylib) +#> frame #49: bcEval_loop + 44444 (0x10239b21c in libR.dylib) +#> frame #50: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #51: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #52: R_execClosure + 761 (0x102384039 in libR.dylib) +#> frame #53: applyClosure_core + 128 (0x102383140 in libR.dylib) +#> frame #54: Rf_eval + 1189 (0x1023817a5 in libR.dylib) +#> frame #55: do_docall + 615 (0x1023122a7 in libR.dylib) +#> frame #56: bcEval_loop + 44444 (0x10239b21c in libR.dylib) +#> frame #57: bcEval + 628 (0x102381df4 in libR.dylib) +#> frame #58: Rf_eval + 506 (0x1023814fa in libR.dylib) +#> frame #59: R_execClosure + 761 (0x102384039 in libR.dylib) +#> frame #60: applyClosure_core + 128 (0x102383140 in libR.dylib) +#> frame #61: Rf_eval + 1189 (0x1023817a5 in libR.dylib) +#> frame #62: forcePromise + 230 (0x102382026 in libR.dylib) #> : diff --git a/dev/articles/using-autograd.html b/dev/articles/using-autograd.html index 83d1c5b0e4..560ce2aec6 100644 --- a/dev/articles/using-autograd.html +++ b/dev/articles/using-autograd.html @@ -284,26 +284,26 @@

    The simple network, now using aut }) } -#> 10 108.7485 -#> 20 96.19302 -#> 30 85.48544 -#> 40 76.29623 -#> 50 68.35393 -#> 60 61.47862 -#> 70 55.51725 -#> 80 50.32376 -#> 90 45.7837 -#> 100 41.8046 -#> 110 38.30745 -#> 120 35.23134 -#> 130 32.53066 -#> 140 30.13708 -#> 150 28.00729 -#> 160 26.10613 -#> 170 24.40407 -#> 180 22.87584 -#> 190 21.50014 -#> 200 20.25876 +#> 10 80.99554 +#> 20 72.35342 +#> 30 64.92963 +#> 40 58.50576 +#> 50 52.9497 +#> 60 48.10678 +#> 70 43.8638 +#> 80 40.14342 +#> 90 36.85871 +#> 100 33.94857 +#> 110 31.36545 +#> 120 29.0694 +#> 130 27.0232 +#> 140 25.19672 +#> 150 23.55789 +#> 160 22.08616 +#> 170 20.76338 +#> 180 19.56994 +#> 190 18.49223 +#> 200 17.51699

    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 28d6f0897e..08484bece5 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-21T11:16Z +last_built: 2025-01-21T20:34Z urls: reference: https://torch.mlverse.org/docs/reference article: https://torch.mlverse.org/docs/articles diff --git a/dev/reference/distr_gamma.html b/dev/reference/distr_gamma.html index a03060abe6..98934bae61 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.4569 +#> 1.8376 #> [ CPUFloatType{1} ] diff --git a/dev/reference/distr_multivariate_normal.html b/dev/reference/distr_multivariate_normal.html index a2522d2cc8..024c3525fe 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.2297 -#> -0.1427 +#> 0.3183 +#> -0.8943 #> [ CPUFloatType{2} ] diff --git a/dev/reference/distr_normal.html b/dev/reference/distr_normal.html index 56fa85cdea..6da468417c 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.1059 +#> -0.2124 #> [ CPUFloatType{1} ] diff --git a/dev/reference/jit_compile.html b/dev/reference/jit_compile.html index e8d0bf91a4..6f0efc016f 100644 --- a/dev/reference/jit_compile.html +++ b/dev/reference/jit_compile.html @@ -103,7 +103,7 @@

    Examplescomp$foo(torch_randn(10)) } #> torch_tensor -#> 2.80001 +#> -2.83887 #> [ CPUFloatType{} ] diff --git a/dev/reference/linalg_cholesky_ex.html b/dev/reference/linalg_cholesky_ex.html index c04da032aa..eb1271d972 100644 --- a/dev/reference/linalg_cholesky_ex.html +++ b/dev/reference/linalg_cholesky_ex.html @@ -178,13 +178,13 @@

    Examples} #> $L #> torch_tensor -#> 0.7815 0.0000 -#> 0.4314 0.8619 +#> -0.2008 0.0000 +#> -0.5371 -1.2100 #> [ CPUFloatType{2,2} ] #> #> $info #> torch_tensor -#> 0 +#> 1 #> [ CPUIntType{} ] #> diff --git a/dev/reference/linalg_det.html b/dev/reference/linalg_det.html index ac0c201ef0..8ebbb23d4e 100644 --- a/dev/reference/linalg_det.html +++ b/dev/reference/linalg_det.html @@ -129,9 +129,9 @@

    Exampleslinalg_det(a) } #> torch_tensor -#> 0.5774 -#> 0.0875 -#> 0.9307 +#> 1.5351 +#> 0.7167 +#> -1.4745 #> [ CPUFloatType{3} ] diff --git a/dev/reference/linalg_eigh.html b/dev/reference/linalg_eigh.html index 3c001a2735..55d80b4c26 100644 --- a/dev/reference/linalg_eigh.html +++ b/dev/reference/linalg_eigh.html @@ -192,14 +192,14 @@

    Examples} #> [[1]] #> torch_tensor -#> -1.7210 -#> 1.4431 +#> -3.0596 +#> 0.7289 #> [ CPUFloatType{2} ] #> #> [[2]] #> torch_tensor -#> -0.4750 -0.8800 -#> 0.8800 -0.4750 +#> -0.7252 0.6885 +#> -0.6885 -0.7252 #> [ CPUFloatType{2,2} ] #> diff --git a/dev/reference/linalg_eigvalsh.html b/dev/reference/linalg_eigvalsh.html index e95fbb83b4..180d155702 100644 --- a/dev/reference/linalg_eigvalsh.html +++ b/dev/reference/linalg_eigvalsh.html @@ -153,8 +153,8 @@

    Exampleslinalg_eigvalsh(a) } #> torch_tensor -#> -1.8269 -#> 0.1696 +#> -1.1499 +#> -0.4112 #> [ CPUFloatType{2} ] diff --git a/dev/reference/linalg_inv.html b/dev/reference/linalg_inv.html index 696a8729fa..f343b6b106 100644 --- a/dev/reference/linalg_inv.html +++ b/dev/reference/linalg_inv.html @@ -144,10 +144,10 @@

    Exampleslinalg_inv(A) } #> torch_tensor -#> -0.2180 0.2906 -0.4188 0.2369 -#> 0.7344 -1.0530 0.1609 0.1168 -#> -0.5590 1.7893 -0.4822 -0.4334 -#> 0.0658 0.3491 0.4124 -0.0937 +#> -1.0217 -0.3961 -0.5096 0.6245 +#> -0.8377 -1.0076 -0.4521 -0.2959 +#> 0.5188 -0.0492 -0.6054 -0.1161 +#> -0.5920 -1.0158 -0.2056 0.7087 #> [ CPUFloatType{4,4} ] diff --git a/dev/reference/linalg_pinv.html b/dev/reference/linalg_pinv.html index 960357e83b..d4709165e5 100644 --- a/dev/reference/linalg_pinv.html +++ b/dev/reference/linalg_pinv.html @@ -177,11 +177,11 @@

    Exampleslinalg_pinv(A) } #> torch_tensor -#> -0.7778 -0.1853 -0.2856 -#> 0.0341 0.1029 -0.3642 -#> 0.8568 -0.0770 0.3378 -#> 0.6388 -0.0313 0.2991 -#> -0.3364 -0.2576 -0.4079 +#> -0.0061 -0.4512 -0.0198 +#> -0.0193 0.7473 0.6815 +#> -0.1683 0.3973 0.2220 +#> -0.2049 -0.2812 -0.2771 +#> -0.0088 -0.3104 0.4212 #> [ CPUFloatType{5,3} ] diff --git a/dev/reference/linalg_slogdet.html b/dev/reference/linalg_slogdet.html index c4aef04632..4d8881b5e6 100644 --- a/dev/reference/linalg_slogdet.html +++ b/dev/reference/linalg_slogdet.html @@ -151,7 +151,7 @@

    Examples#> #> [[2]] #> torch_tensor -#> 1.02595 +#> -0.43686 #> [ CPUFloatType{} ] #> diff --git a/dev/reference/linalg_svd.html b/dev/reference/linalg_svd.html index f794f0468f..9c984121ff 100644 --- a/dev/reference/linalg_svd.html +++ b/dev/reference/linalg_svd.html @@ -203,25 +203,25 @@

    Examples} #> [[1]] #> torch_tensor -#> -0.3704 -0.0654 -0.1734 -#> -0.4922 -0.3233 0.7856 -#> 0.2588 0.7493 0.5293 -#> -0.2207 -0.1068 0.0236 -#> 0.7105 -0.5642 0.2684 +#> -0.2912 0.2972 0.7856 +#> -0.9037 0.0731 -0.1761 +#> -0.2696 -0.2398 -0.4523 +#> -0.0942 -0.9213 0.3557 +#> -0.1306 -0.0096 0.1441 #> [ CPUFloatType{5,3} ] #> #> [[2]] #> torch_tensor -#> 3.3872 -#> 1.8658 -#> 0.6717 +#> 2.5925 +#> 1.5552 +#> 1.1338 #> [ CPUFloatType{3} ] #> #> [[3]] #> torch_tensor -#> 0.5910 0.8032 0.0751 -#> 0.4405 -0.2433 -0.8642 -#> 0.6758 -0.5438 0.4976 +#> -0.1789 -0.0118 -0.9838 +#> 0.9074 -0.3884 -0.1604 +#> -0.3802 -0.9214 0.0802 #> [ CPUFloatType{3,3} ] #> diff --git a/dev/reference/linalg_svdvals.html b/dev/reference/linalg_svdvals.html index aec7f53e05..24e1df0281 100644 --- a/dev/reference/linalg_svdvals.html +++ b/dev/reference/linalg_svdvals.html @@ -135,9 +135,9 @@

    ExamplesS } #> torch_tensor -#> 4.0253 -#> 1.5845 -#> 0.8937 +#> 3.4443 +#> 2.6040 +#> 1.4162 #> [ CPUFloatType{3} ] diff --git a/dev/reference/linalg_tensorsolve.html b/dev/reference/linalg_tensorsolve.html index 1611b94c8e..91503711d2 100644 --- a/dev/reference/linalg_tensorsolve.html +++ b/dev/reference/linalg_tensorsolve.html @@ -155,7 +155,7 @@

    ExamplesA <- A$permute(c(2, 4, 5, 1, 3)) torch_allclose(torch_tensordot(A, X, dims = X$ndim), B, atol = 1e-6) } -#> [1] FALSE +#> [1] TRUE