From 773d7072f1ea829eeb55985663bed532e58f3cb2 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Fri, 17 Sep 2021 16:39:00 -0400 Subject: [PATCH] pkgdown::build_site() --- CRAN-RELEASE | 2 - docs/404.html | 2 +- docs/LICENSE.html | 2 +- docs/articles/demo-mnist.html | 48 +++++++++---------- .../header-attrs-2.10/header-attrs.js | 12 +++++ .../header-attrs-2.11/header-attrs.js | 12 +++++ docs/articles/hints.html | 6 +-- .../header-attrs-2.10/header-attrs.js | 12 +++++ .../header-attrs-2.11/header-attrs.js | 12 +++++ docs/articles/index.html | 2 +- docs/articles/tf-v1.html | 46 +++++++++--------- .../header-attrs-2.10/header-attrs.js | 12 +++++ .../header-attrs-2.11/header-attrs.js | 12 +++++ docs/articles/tfautograph.html | 26 +++++----- .../header-attrs-2.10/header-attrs.js | 12 +++++ .../header-attrs-2.11/header-attrs.js | 12 +++++ docs/authors.html | 2 +- docs/index.html | 4 +- docs/news/index.html | 25 ++++++++-- docs/pkgdown.yml | 2 +- docs/reference/ag_if_vars.html | 2 +- docs/reference/ag_loop_vars.html | 2 +- docs/reference/ag_name.html | 2 +- docs/reference/ag_while_opts.html | 2 +- docs/reference/autograph.html | 2 +- docs/reference/index.html | 2 +- ...thon.ops.tensor_array_ops.TensorArray.html | 2 +- docs/reference/tf_assert.html | 2 +- docs/reference/tf_case.html | 2 +- docs/reference/tf_cond.html | 2 +- docs/reference/tf_map.html | 2 +- docs/reference/tf_switch.html | 2 +- docs/reference/view_function_graph.html | 2 +- 33 files changed, 200 insertions(+), 89 deletions(-) delete mode 100644 CRAN-RELEASE create mode 100644 docs/articles/demo-mnist_files/header-attrs-2.10/header-attrs.js create mode 100644 docs/articles/demo-mnist_files/header-attrs-2.11/header-attrs.js create mode 100644 docs/articles/hints_files/header-attrs-2.10/header-attrs.js create mode 100644 docs/articles/hints_files/header-attrs-2.11/header-attrs.js create mode 100644 docs/articles/tf-v1_files/header-attrs-2.10/header-attrs.js create mode 100644 docs/articles/tf-v1_files/header-attrs-2.11/header-attrs.js create mode 100644 docs/articles/tfautograph_files/header-attrs-2.10/header-attrs.js create mode 100644 docs/articles/tfautograph_files/header-attrs-2.11/header-attrs.js diff --git a/CRAN-RELEASE b/CRAN-RELEASE deleted file mode 100644 index ed55ff5..0000000 --- a/CRAN-RELEASE +++ /dev/null @@ -1,2 +0,0 @@ -This package was submitted to CRAN on 2021-08-19. -Once it is accepted, delete this file and tag the release (commit b27b8cf). diff --git a/docs/404.html b/docs/404.html index def1abf..e78260b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 5ba0931..0c45d39 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -71,7 +71,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/articles/demo-mnist.html b/docs/articles/demo-mnist.html index 69e4b8f..7c29dfa 100644 --- a/docs/articles/demo-mnist.html +++ b/docs/articles/demo-mnist.html @@ -31,7 +31,7 @@ tfautograph - 0.3.0 + 0.3.2 @@ -97,7 +97,7 @@ -
+
+#> [1] "2.6.0"

First, some helpers so we can capture tf.print() output in the Rmarkdown vignette.

 TEMPFILE <- tempfile("tf-print-out", fileext = ".txt")
@@ -219,18 +219,17 @@ 

c(step, loss) %<-% train(model, optimizer) print_tempfile() -#> Step 10 : loss 1.80673671 ; accuracy 0.347 -#> Step 20 : loss 1.11898279 ; accuracy 0.53 -#> Step 30 : loss 0.805581868 ; accuracy 0.610666692 -#> Step 40 : loss 0.568358243 ; accuracy 0.6625 -#> Step 50 : loss 0.399444312 ; accuracy 0.699 -#> Step 60 : loss 0.446221232 ; accuracy 0.728666663 -#> Step 70 : loss 0.331145823 ; accuracy 0.751428545 -#> Step 80 : loss 0.37857765 ; accuracy 0.768625 -#> Step 90 : loss 0.317810059 ; accuracy 0.783111095 -#> Step 100 : loss 0.427253962 ; accuracy 0.7925 +#> Step 10 : loss 1.71274185 ; accuracy 0.392 +#> Step 20 : loss 1.14219153 ; accuracy 0.5385 +#> Step 30 : loss 0.720202565 ; accuracy 0.612666667 +#> Step 40 : loss 0.508623421 ; accuracy 0.673 +#> Step 50 : loss 0.426777333 ; accuracy 0.7104 +#> Step 60 : loss 0.342745066 ; accuracy 0.743166685 +#> Step 70 : loss 0.371664643 ; accuracy 0.765714288 +#> Step 80 : loss 0.369277507 ; accuracy 0.78075 +#> Step 90 : loss 0.324099153 ; accuracy 0.793777764 #> Accuracy over 0.8; breaking early -#> Final step 107 : loss 0.295072317 ; accuracy 0.800934553

+#> Final step 97 : loss 0.387442589 ; accuracy 0.801030934

@@ -242,17 +241,18 @@

c(step, loss) %<-% train_on_graph(model, optimizer) print_tempfile() -#> Step 10 : loss 1.83807766 ; accuracy 0.766324759 -#> Step 20 : loss 1.18400359 ; accuracy 0.760157466 -#> Step 30 : loss 0.710455537 ; accuracy 0.762189806 -#> Step 40 : loss 0.513632596 ; accuracy 0.766598642 -#> Step 50 : loss 0.447790742 ; accuracy 0.771910846 -#> Step 60 : loss 0.49845317 ; accuracy 0.778503 -#> Step 70 : loss 0.415089786 ; accuracy 0.784293771 -#> Step 80 : loss 0.340893924 ; accuracy 0.790374339 -#> Step 90 : loss 0.489483982 ; accuracy 0.796091378 +#> Step 10 : loss 1.95382404 ; accuracy 0.766729 +#> Step 20 : loss 1.23789883 ; accuracy 0.754358947 +#> Step 30 : loss 0.655607045 ; accuracy 0.755118132 +#> Step 40 : loss 0.658970356 ; accuracy 0.759197056 +#> Step 50 : loss 0.5310058 ; accuracy 0.765646279 +#> Step 60 : loss 0.415600359 ; accuracy 0.772420406 +#> Step 70 : loss 0.402227402 ; accuracy 0.778922141 +#> Step 80 : loss 0.33683449 ; accuracy 0.785932183 +#> Step 90 : loss 0.444064975 ; accuracy 0.791711211 +#> Step 100 : loss 0.404047877 ; accuracy 0.797563434 #> Accuracy over 0.8; breaking early -#> Final step 98 : loss 0.35463649 ; accuracy 0.800390244

+#> Final step 106 : loss 0.3598544 ; accuracy 0.800394118 diff --git a/docs/articles/demo-mnist_files/header-attrs-2.10/header-attrs.js b/docs/articles/demo-mnist_files/header-attrs-2.10/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/demo-mnist_files/header-attrs-2.10/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/demo-mnist_files/header-attrs-2.11/header-attrs.js b/docs/articles/demo-mnist_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/demo-mnist_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/hints.html b/docs/articles/hints.html index cef9d6a..2f13770 100644 --- a/docs/articles/hints.html +++ b/docs/articles/hints.html @@ -31,7 +31,7 @@ tfautograph - 0.3.0 + 0.3.2 @@ -97,7 +97,7 @@ -
+
+#> [1] "2.6.0"

autograph() works without needing to provide any hints. It can automatically translate expressions like if and while into tf.cond() and tf.while_loop() calls.

However, compared to the flexibility of R control flow, the tensorflow control flow functions have much narrower constraints on how the control flow nodes are constructed. The constraints of functions like tf.cond(), tf.while_loop() and dataset.reduct() require that autograph() do some sophisticated inference from the R code to anticipate what the outcome will be from evaluating a block of code, so that it can “fix-up” the outcome to satisfy the constraints tensorflow sets out.

If you want to bypass these inference routines, (for example, because the inferred outcome is producing a graph that has more nodes than strictly necessary, or for some minor performance benefits), you can provide hints to autograph to let it know what it would otherwise try to infer.

diff --git a/docs/articles/hints_files/header-attrs-2.10/header-attrs.js b/docs/articles/hints_files/header-attrs-2.10/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/hints_files/header-attrs-2.10/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/hints_files/header-attrs-2.11/header-attrs.js b/docs/articles/hints_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/hints_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/index.html b/docs/articles/index.html index e1835a4..6bdeeeb 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ tfautograph - 0.3.0 + 0.3.2
diff --git a/docs/articles/tf-v1.html b/docs/articles/tf-v1.html index 4b29314..c1e7fb6 100644 --- a/docs/articles/tf-v1.html +++ b/docs/articles/tf-v1.html @@ -31,7 +31,7 @@ tfautograph - 0.3.0 + 0.3.2
@@ -97,7 +97,7 @@ -
+

The other is to capture the assert operation as a control dependency of the evaluated tensor.

@@ -246,8 +248,8 @@ 

Autographing Tensorflow version 1.15

# [<R call 28>: rmarkdown::render(...)] # [<R call 29>: (function (...) ] # [<R call 30>: (function (what, args, quote = FALSE, envir = parent.frame()) ] -# [<R call 31>: do.call(do.call, c(readRDS(\"/tmp/Rtmpj4zvS8/callr-fun-2ffd54a69f0a\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)] -# [<R call 32>: saveRDS(do.call(do.call, c(readRDS(\"/tmp/Rtmpj4zvS8/callr-fun-2ffd54a69f0a\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = \"/tmp/Rtmpj4zvS8/callr-res-2ffd3626d811\")] +# [<R call 31>: do.call(do.call, c(readRDS(\"/tmp/RtmpEYn9yM/callr-fun-55c9194f81bb\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)] +# [<R call 32>: saveRDS(do.call(do.call, c(readRDS(\"/tmp/RtmpEYn9yM/callr-fun-55c9194f81bb\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = \"/tmp/RtmpEYn9yM/callr-res-55c930331500\")] # [<R call 33>: withCallingHandlers({] # [<R call 34>: doTryCatch(return(expr), name, parentenv, handler)] # [<R call 35>: tryCatchOne(expr, names, parentenv, handlers[[1L]])] @@ -259,13 +261,13 @@

Autographing Tensorflow version 1.15

#> [[node Assert_1/AssertGuard/Assert (defined at /framework/ops.py:1748) ]] #> #> Detailed traceback: -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run #> run_metadata_ptr) -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run #> feed_dict_tensor, options, run_metadata) -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run #> run_metadata) -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call #> raise type(e)(node_def, op, message)

Because the latter approach in stop_if_negative3 is so common and so cumbersome, autograph takes care of it for you when autographing stopifnot() calls.

@@ -311,8 +313,8 @@ 

Autographing Tensorflow version 1.15

# [<R call 32>: rmarkdown::render(...)] # [<R call 33>: (function (...) ] # [<R call 34>: (function (what, args, quote = FALSE, envir = parent.frame()) ] -# [<R call 35>: do.call(do.call, c(readRDS(\"/tmp/Rtmpj4zvS8/callr-fun-2ffd54a69f0a\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)] -# [<R call 36>: saveRDS(do.call(do.call, c(readRDS(\"/tmp/Rtmpj4zvS8/callr-fun-2ffd54a69f0a\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = \"/tmp/Rtmpj4zvS8/callr-res-2ffd3626d811\")] +# [<R call 35>: do.call(do.call, c(readRDS(\"/tmp/RtmpEYn9yM/callr-fun-55c9194f81bb\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)] +# [<R call 36>: saveRDS(do.call(do.call, c(readRDS(\"/tmp/RtmpEYn9yM/callr-fun-55c9194f81bb\"), list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = \"/tmp/RtmpEYn9yM/callr-res-55c930331500\")] # [<R call 37>: withCallingHandlers({] # [<R call 38>: doTryCatch(return(expr), name, parentenv, handler)] # [<R call 39>: tryCatchOne(expr, names, parentenv, handlers[[1L]])] @@ -324,13 +326,13 @@

Autographing Tensorflow version 1.15

#> [[node Assert_2/AssertGuard/Assert (defined at /framework/ops.py:1748) ]] #> #> Detailed traceback: -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run #> run_metadata_ptr) -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run #> feed_dict_tensor, options, run_metadata) -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run #> run_metadata) -#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-1.15/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call +#> File "/home/tomasz/.local/share/r-miniconda/envs/tf-v1/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call #> raise type(e)(node_def, op, message)

Note that the error was thrown even though we are not using tf.function(). How does autograph(stopifnot(...)) guarantee that the created tf$Assert() Op is evaluated? With a multi-pronged, belt-and-suspenders approach:

    diff --git a/docs/articles/tf-v1_files/header-attrs-2.10/header-attrs.js b/docs/articles/tf-v1_files/header-attrs-2.10/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/tf-v1_files/header-attrs-2.10/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/tf-v1_files/header-attrs-2.11/header-attrs.js b/docs/articles/tf-v1_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/tf-v1_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/tfautograph.html b/docs/articles/tfautograph.html index 08629a4..29f1978 100644 --- a/docs/articles/tfautograph.html +++ b/docs/articles/tfautograph.html @@ -31,7 +31,7 @@ tfautograph - 0.3.0 + 0.3.2
@@ -97,7 +97,7 @@ -
+
@@ -173,7 +173,6 @@

square_if_positive_verbose(x) #> Evaluating true branch #> tf.Tensor(25.0, shape=(), dtype=float32) - square_if_positive_verbose(y) #> Evaluating false branch #> tf.Tensor(-5.0, shape=(), dtype=float32) @@ -196,7 +195,6 @@

#> tf.Tensor(25.0, shape=(), dtype=float32) graph_fn(x) #> tf.Tensor(25.0, shape=(), dtype=float32) - graph_fn(y) #> tf.Tensor(-5.0, shape=(), dtype=float32) graph_fn(y) @@ -280,24 +278,24 @@

#> To access this symbol, Tensorflow requires that an object with the same dtype and shape be assigned to the symbol either before the `if` statement, or in all branches of the `if` statement. #> #> Detailed traceback: -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 889, in __call__ +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 885, in __call__ #> result = self._call(*args, **kwds) #> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 933, in _call #> self._initialize(args, kwds, add_initializers_to=initializers) -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 764, in _initialize +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 760, in _initialize #> *args, **kwds)) -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3050, in _get_concrete_function_internal_garbage_collected +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3066, in _get_concrete_function_internal_garbage_collected #> graph_function, _ = self._maybe_define_function(args, kwargs) -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3444, in _maybe_define_function +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3463, in _maybe_define_function #> graph_function = self._create_graph_function(args, kwargs) -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3289, in _create_graph_function +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3308, in _create_graph_function #> capture_by_value=self._capture_by_value), -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/framework/func_graph.py", line 999, in func_graph_from_py_func +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/framework/func_graph.py", line 1007, in func_graph_from_py_func #> func_outputs = python_func(*func_args, **func_kwargs) -#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 672, in wrapped_fn +#> File "/home/tomasz/.local/share/r-miniconda/envs/r-reticulate/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 668, in wrapped_fn #> out = weak_wrapped_fn().__wrapped__(*args, **kwds) #> File "<string>", line 4, in fn -#> File "/home/tomasz/opt/R-4.1.0/lib/R/site-library/reticulate/python/rpytools/call.py", line 21, in python_function +#> File "/home/tomasz/opt/R-4.1.1/lib/R/site-library/reticulate/python/rpytools/call.py", line 21, in python_function #> raise RuntimeError(res[kErrorKey])

diff --git a/docs/articles/tfautograph_files/header-attrs-2.10/header-attrs.js b/docs/articles/tfautograph_files/header-attrs-2.10/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/tfautograph_files/header-attrs-2.10/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/articles/tfautograph_files/header-attrs-2.11/header-attrs.js b/docs/articles/tfautograph_files/header-attrs-2.11/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/tfautograph_files/header-attrs-2.11/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/authors.html b/docs/authors.html index 5e9cca6..d04f161 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ tfautograph - 0.3.0 + 0.3.2
diff --git a/docs/index.html b/docs/index.html index 327d4fe..2f2f502 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ tfautograph - 0.3.0 + 0.3.2
@@ -177,7 +177,7 @@

Developers

Dev status

  • CRAN status
  • -
  • Travis build status
  • +
  • R build status
diff --git a/docs/news/index.html b/docs/news/index.html index bd85b91..d4e8a61 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ tfautograph - 0.3.0 + 0.3.2 @@ -144,9 +144,26 @@

Changelog

Source: NEWS.md -
-

-tfautograph 0.2.0.9000 Unreleased +
+

+tfautograph 0.3.2 Unreleased +

+
    +
  • Added back compatibility with R-3.3 and R-3.4
  • +
+
+
+

+tfautograph 0.3.1 2021-08-19 +

+ +
+
+

+tfautograph 0.3.0 2021-07-14

  • Improved handling of shape_invariants supplied to ag_while_opts. A named list of user variable shapes can be passed directly now, without requiring users to manually specify shapes of internal loop tracking tensors.
  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index f306cbf..e2d17ec 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -6,5 +6,5 @@ articles: hints: hints.html tf-v1: tf-v1.html tfautograph: tfautograph.html -last_built: 2021-07-13T20:05Z +last_built: 2021-09-17T20:38Z diff --git a/docs/reference/ag_if_vars.html b/docs/reference/ag_if_vars.html index 690e20f..5cd86f3 100644 --- a/docs/reference/ag_if_vars.html +++ b/docs/reference/ag_if_vars.html @@ -75,7 +75,7 @@ tfautograph - 0.3.0 + 0.3.2
diff --git a/docs/reference/ag_loop_vars.html b/docs/reference/ag_loop_vars.html index 2d87bdd..613f931 100644 --- a/docs/reference/ag_loop_vars.html +++ b/docs/reference/ag_loop_vars.html @@ -75,7 +75,7 @@ tfautograph - 0.3.0 + 0.3.2

diff --git a/docs/reference/ag_name.html b/docs/reference/ag_name.html index f5ba87d..64e964f 100644 --- a/docs/reference/ag_name.html +++ b/docs/reference/ag_name.html @@ -73,7 +73,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/ag_while_opts.html b/docs/reference/ag_while_opts.html index 32d1ff0..77ac7a6 100644 --- a/docs/reference/ag_while_opts.html +++ b/docs/reference/ag_while_opts.html @@ -73,7 +73,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/autograph.html b/docs/reference/autograph.html index f19909d..92f0d23 100644 --- a/docs/reference/autograph.html +++ b/docs/reference/autograph.html @@ -75,7 +75,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/index.html b/docs/reference/index.html index ca1bda3..b3c83fa 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/sub-subset-.tensorflow.python.ops.tensor_array_ops.TensorArray.html b/docs/reference/sub-subset-.tensorflow.python.ops.tensor_array_ops.TensorArray.html index 3bb57a3..b3a09b4 100644 --- a/docs/reference/sub-subset-.tensorflow.python.ops.tensor_array_ops.TensorArray.html +++ b/docs/reference/sub-subset-.tensorflow.python.ops.tensor_array_ops.TensorArray.html @@ -72,7 +72,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/tf_assert.html b/docs/reference/tf_assert.html index 45f040b..4078549 100644 --- a/docs/reference/tf_assert.html +++ b/docs/reference/tf_assert.html @@ -76,7 +76,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/tf_case.html b/docs/reference/tf_case.html index 210297f..e3aa494 100644 --- a/docs/reference/tf_case.html +++ b/docs/reference/tf_case.html @@ -73,7 +73,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/tf_cond.html b/docs/reference/tf_cond.html index 9d757f9..bc187ef 100644 --- a/docs/reference/tf_cond.html +++ b/docs/reference/tf_cond.html @@ -73,7 +73,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/tf_map.html b/docs/reference/tf_map.html index 86ad77a..0c0edb0 100644 --- a/docs/reference/tf_map.html +++ b/docs/reference/tf_map.html @@ -78,7 +78,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/tf_switch.html b/docs/reference/tf_switch.html index 8e433c2..38d07ba 100644 --- a/docs/reference/tf_switch.html +++ b/docs/reference/tf_switch.html @@ -72,7 +72,7 @@ tfautograph - 0.3.0 + 0.3.2 diff --git a/docs/reference/view_function_graph.html b/docs/reference/view_function_graph.html index 07294b9..35bc537 100644 --- a/docs/reference/view_function_graph.html +++ b/docs/reference/view_function_graph.html @@ -72,7 +72,7 @@ tfautograph - 0.3.0 + 0.3.2