Coder Social home page Coder Social logo

jimhester / tensorflow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rstudio/tensorflow

0.0 2.0 0.0 7.2 MB

TensorFlow for R

Home Page: https://rstudio.github.io/tensorflow

License: Apache License 2.0

R 64.33% Shell 0.70% M4 2.32% Python 2.81% C++ 29.84%

tensorflow's Introduction

Travis-CI Build Status

TensorFlow for R

TensorFlow™ 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.

The TensorFlow API is composed of a set of Python modules that enable constructing and executing TensorFlow graphs. The tensorflow package provides access to the complete TensorFlow API from within R.

Installing TensorFlow

You can install the main TensorFlow distribution from here:

https://www.tensorflow.org/get_started/os_setup.html#download-and-setup

NOTE: You should NOT install TensorFlow with Anaconda as there are issues with the way Anaconda builds the python shared library that prevent dynamic linking from R.

If you install TensorFlow within a Virtualenv environment you'll need to be sure to use that same environment when installing the tensorflow R package (see below for details).

Installing the R Package

If you installed TensorFlow via pip with your system default version of python then you can install the tensorflow R package as follows:

devtools::install_github("rstudio/tensorflow")

If you are using a different version of python for TensorFlow, you should set the TENSORFLOW_PYTHON environment variable to the full path of the python binary before installing, for example:

Sys.setenv(TENSORFLOW_PYTHON="/usr/local/bin/python")
devtools::install_github("rstudio/tensorflow")

If you only need to customize the version of python used (for example specifing python 3 on an Ubuntu system), you can set the TENSORFLOW_PYTHON_VERSION environment variable before installation:

Sys.setenv(TENSORFLOW_PYTHON_VERSION = 3)
devtools::install_github("rstudio/tensorflow")

Verifying Installation

You can verify that your installation is working correctly by running this script:

library(tensorflow)
sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)

Documentation

We recommend that users try out TensorFlow's high-level TF.Learn module which requires less use of lower-level TensorFlow APIs. Some basic examples can be found here.

See the package website for additional details on using the TensorFlow API from R: https://rstudio.github.io/tensorflow

See the TensorFlow API reference for details on all of the modules, classes, and functions within the API: https://www.tensorflow.org/api_docs/python/index.html

The tensorflow package provides code completion and inline help for the TensorFlow API when running within the RStudio IDE. In order to take advantage of these features you should also install the current Preview Release of RStudio.

tensorflow's People

Contributors

eddelbuettel avatar goldingn avatar jjallaire avatar kevinushey avatar terrytangyuan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.