Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ travis_install.sh
run_tests.sh
testenv
MNIST-data
^appveyor\.yml$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tensorflow
Type: Package
Title: R Interface to 'TensorFlow'
Version: 1.10.0.9001
Version: 1.13.1
Authors@R: c(
person("JJ", "Allaire", role = c("aut", "cre"), email = "jj@rstudio.com"),
person(family = "RStudio", role = c("cph", "fnd")),
Expand Down Expand Up @@ -46,4 +46,4 @@ Imports:
rstudioapi (>= 0.7)
Roxygen: list(markdown = TRUE)
Suggests: testthat, keras, tfestimators
RoxygenNote: 6.1.0
RoxygenNote: 6.1.1
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Development version


## TensorFlow 1.13.1 (CRAN)

- added option to silence TF CPP info output

- `tf_gpu_configured` function to check if GPU was correctly


20 changes: 10 additions & 10 deletions R/generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,26 +288,26 @@


#' @export
Re.tensorflow.tensor <- function(x) {
tf$real(x)
Re.tensorflow.tensor <- function(z) {
tf$real(z)
}

#' @export
Im.tensorflow.tensor <- function(x) {
tf$imag(x)
Im.tensorflow.tensor <- function(z) {
tf$imag(z)
}

#' @export
Conj.tensorflow.tensor <- function(x) {
tf$conj(x)
Conj.tensorflow.tensor <- function(z) {
tf$conj(z)
}

#' @export
Arg.tensorflow.tensor <- function(x) {
tf$angle(x)
Arg.tensorflow.tensor <- function(z) {
tf$angle(z)
}

#' @export
Mod.tensorflow.tensor <- function(x) {
tf$abs(x)
Mod.tensorflow.tensor <- function(z) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - why are these changes needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deals with those CRAN warnings about methods consistency. It seems that the methods for complex numbers are defined in terms of z.

* checking S3 generic/method consistency ... WARNING
Arg:
  function(z)
Arg.tensorflow.tensor:
  function(x)

Conj:
  function(z)
Conj.tensorflow.tensor:
  function(x)

Im:
  function(z)
Im.tensorflow.tensor:
  function(x)

Mod:
  function(z)
Mod.tensorflow.tensor:
  function(x)

Re:
  function(z)
Re.tensorflow.tensor:
  function(x)

tf$abs(z)
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

## TensorFlow for R

[![Travis-CI Build Status](https://travis-ci.org/rstudio/tensorflow.svg?branch=master)](https://travis-ci.org/rstudio/tensorflow) [![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/tensorflow)](https://cran.r-project.org/package=tensorflow)
[![Travis-CI Build Status](https://travis-ci.org/rstudio/tensorflow.svg?branch=master)](https://travis-ci.org/rstudio/tensorflow) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/rstudio/tensorflow?branch=master&svg=true)](https://ci.appveyor.com/project/rstudio/tensorflow) [![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/tensorflow)](https://cran.r-project.org/package=tensorflow)

[TensorFlow™](https://www.tensorflow.org) is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API.

Expand Down
51 changes: 51 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# DO NOT CHANGE the "init" and "install" sections below

environment:
matrix:
- TF_VERSION: 1.13.1
- TF_VERSION: 1.12.0

# Download script file from GitHub
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'

install:
ps: Bootstrap

cache:
- C:\RLibrary

# Adapt as necessary starting from here

build_script:
- C:\Miniconda3-x64\Scripts\conda create -y --name r-tensorflow tensorflow=%TF_VERSION% numpy python=3.6.8
- travis-tool.sh install_deps

test_script:
- travis-tool.sh run_tests

on_failure:
- 7z a failure.zip *.Rcheck\*
- appveyor PushArtifact failure.zip

artifacts:
- path: '*.Rcheck\**\*.log'
name: Logs

- path: '*.Rcheck\**\*.out'
name: Logs

- path: '*.Rcheck\**\*.fail'
name: Logs

- path: '*.Rcheck\**\*.Rout'
name: Logs

- path: '\*_*.tar.gz'
name: Bits

- path: '\*_*.zip'
name: Bits
3 changes: 1 addition & 2 deletions man/install_tensorflow.Rd

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

8 changes: 4 additions & 4 deletions man/sub-.tensorflow.tensor.Rd

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