Skip to content

Commit

Permalink
Merge pull request #1308 from rstudio/release/2.8
Browse files Browse the repository at this point in the history
Release/2.8
  • Loading branch information
t-kalinowski authored Feb 10, 2022
2 parents 16572fb + bb260e8 commit 1c08139
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
continue-on-error: ${{ matrix.tf == 'nightly' || contains(matrix.tf, 'rc') || matrix.r == 'devel' }}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: 'true'
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
# R_COMPILE_AND_INSTALL_PACKAGES: 'never' # commented out until CRAN builds TF 2.8
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
id: r-package-cache
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.os }}-${{ steps.setup-r.outputs.installed-r-version }}-${{ steps.get-date.outputs.year-week }}-2
key: ${{ matrix.os }}-${{ steps.setup-r.outputs.installed-r-version }}-${{ steps.get-date.outputs.year-week }}-3

- name: Install remotes
if: steps.r-package-cache.outputs.cache-hit != 'true'
Expand Down
5 changes: 1 addition & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: keras
Type: Package
Title: R Interface to 'Keras'
Version: 2.7.0.9000
Version: 2.8.0
Authors@R: c(
person("Tomasz", "Kalinowski", role = c("ctb", "cph", "cre"),
email = "[email protected]"),
Expand Down Expand Up @@ -51,6 +51,3 @@ Suggests:
Roxygen: list(markdown = TRUE, r6 = FALSE)
RoxygenNote: 7.1.2
VignetteBuilder: knitr
Remotes:
rstudio/reticulate,
rstudio/tensorflow
20 changes: 14 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# keras (development version)
# keras 2.8.0

- Breaking change: The semantics of passing a named list to `keras_model()` have changed.

Previously, `keras_model()` would `unname()` supplied `inputs` and `outputs`.
Then, if a named list was passed to subsequent
`fit()`/`evaluate()`/`call()`/`predict()` invocations,
matching of `x` and `y` was done to the model's `tensor$name`'s.
Now, matching is done to `names()` of `inputs` and/or `outputs`.
matching of `x` and `y` was done to the model's input and outpt `tensor$name`'s.
Now, matching is done to `names()` of `inputs` and/or `outputs` supplied to `keras_model()`.
Call `unname()` on `inputs` and `outputs` to restore the old behavior, e.g.:
```keras_model(unname(inputs), unname(outputs))```
```
keras_model(unname(inputs), unname(outputs))
```
`keras_model()` can now accept a named list for multi-input and/or multi-output
models. (Requires Tensorflow >= 2.4). The named list is converted to a `dict` in python.
models. The named list is converted to a `dict` in python.
(Requires Tensorflow >= 2.4, Python >= 3.7).
If `inputs` is a named list:
- `call()`, `fit()`, `evaluate()`, and `predict()` methods can also
Expand All @@ -26,14 +29,19 @@
- New layer `layer_depthwise_conv_1d()`.
- Models gain default `format()` and `print()` S3 methods for compatibility
- Models gain `format()` and `print()` S3 methods for compatibility
with the latest reticulate. Both are powered by `model$summary()`.
- `summary()` method for Models gains arguments `expand_nested` and `show_trainable`,
both default to `FALSE`.
- `keras_model_custom()` is soft deprecated. Please define custom models by
subclassing `keras$Model` directly using `%py_class%` or `R6::R6Class()`.
- Fixed warning issued by `k_random_binomial()`.
- Fixed error raised when `k_random_binomial()` was passed a non-floating dtype.
- Added `k_random_bernouli()` as an alias for `k_random_binomial()`.
- `image_load()` gains a `color_mode` argument.
Expand Down
4 changes: 2 additions & 2 deletions R/layers-recurrent.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ layer_cudnn_gru <- function(object, units,
#' @template roxlate-recurrent-layer
#'
#' @section References:
#' - [Long short-term memory](https://www.bioinf.jku.at/publications/older/2604.pdf) (original 1997 paper)
#' - [Long short-term memory](http://www.bioinf.jku.at/publications/older/2604.pdf) (original 1997 paper)
#' - [Supervised sequence labeling with recurrent neural networks](https://www.cs.toronto.edu/~graves/preprint.pdf)
#' - [A Theoretically Grounded Application of Dropout in Recurrent Neural Networks](https://arxiv.org/abs/1512.05287)
#'
Expand Down Expand Up @@ -291,7 +291,7 @@ function(object,
#' @inheritParams layer_dense
#'
#' @section References:
#' - [Long short-term memory](https://www.bioinf.jku.at/publications/older/2604.pdf) (original 1997 paper)
#' - [Long short-term memory](http://www.bioinf.jku.at/publications/older/2604.pdf) (original 1997 paper)
#' - [Supervised sequence labeling with recurrent neural networks](https://www.cs.toronto.edu/~graves/preprint.pdf)
#' - [A Theoretically Grounded Application of Dropout in Recurrent Neural Networks](https://arxiv.org/abs/1512.05287)
#'
Expand Down
2 changes: 1 addition & 1 deletion man/layer_cudnn_lstm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/layer_lstm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/new-guides/working_with_rnns.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ timestep is to be fed to the next timestep.
[Cho et al., 2014](https://arxiv.org/abs/1406.1078).

3. `layer_lstm()`, first proposed in
[Hochreiter & Schmidhuber, 1997](https://www.bioinf.jku.at/publications/older/2604.pdf).
[Hochreiter & Schmidhuber, 1997](http://www.bioinf.jku.at/publications/older/2604.pdf).

Here is a simple example of a sequential model that processes sequences of integers,
embeds each integer into a 64-dimensional vector, then processes the sequence of
Expand Down

0 comments on commit 1c08139

Please sign in to comment.