Skip to content

Commit

Permalink
Merge branch 'release/v0.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
f0nzie committed Jul 21, 2019
2 parents 65e81ef + 96a3c82 commit 8e8de99
Show file tree
Hide file tree
Showing 73 changed files with 6,258 additions and 12 deletions.
9 changes: 7 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
^.*\.Rproj$
^\.Rproj\.user$
^.*\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^LICENSE\.md$
vignettes/data
vignettes/datasets
notebooks
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source(file.path('..', '..', 'R', 'set_env.R'), chdir = TRUE)
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.Rproj.user
.Rhistory
.RData
inst/doc
notebooks
vignettes/data
vignettes/datasets

*.Rd

*.pyc

*.html
28 changes: 22 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
Package: rTorch
Title: What the Package Does (one line, title case)
Version: 0.0.0.9000
Authors@R: person("First", "Last", email = "[email protected]", role = c("aut", "cre"))
Description: What the package does (one paragraph).
Depends: R (>= 3.4.3)
License: What license is it under?
Title: R bindings to PyTorch
Version: 0.0.1
Authors@R: person("Alfonso R.", "Reyes", role = c("aut", "cre"), email = "[email protected]")
Description: R implementation of Machine Learning platform developed in Python.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Depends: R (>= 3.1)
Imports: logging,
config,
reticulate,
utils,
yaml,
methods,
R6,
rstudioapi (>= 0.7),
data.table
Suggests:
testthat,
knitr,
rmarkdown
RoxygenNote: 6.1.1
URL: https://github.com/f0nzie/rTorch
VignetteBuilder: knitr
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2018
COPYRIGHT HOLDER: Alfonso R. Reyes
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2018 Alfonso R. Reyes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
85 changes: 83 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,83 @@
# Generated by roxygen2: fake comment so roxygen2 overwrites silently.
exportPattern("^[^\\.]")
# Generated by roxygen2: do not edit by hand

S3method("!=",torch.Tensor)
S3method("&",torch.Tensor)
S3method("*",torch.Tensor)
S3method("+",torch.Tensor)
S3method("-",torch.Tensor)
S3method("/",torch.Tensor)
S3method("<",torch.Tensor)
S3method("<=",torch.Tensor)
S3method("==",torch.Tensor)
S3method(">",torch.Tensor)
S3method(">=",torch.Tensor)
S3method("[",torch.Tensor)
S3method("^",torch.Tensor)
S3method("|",torch.Tensor)
S3method(.DollarNames,torch.python.platform.flags._FlagValues)
S3method(dim,torch.Tensor)
S3method(exp,torch.Tensor)
S3method(length,torch.Tensor)
S3method(log,torch.Tensor)
S3method(log10,torch.Tensor)
S3method(log2,torch.Tensor)
S3method(print,pytorch_config)
S3method(print,torch.Tensor)
S3method(py_str,torch.python.ops.variables.Variable)
export("%**%")
export("%.*%")
export("%as%")
export(all_dims)
export(array_reshape)
export(dataset_mnist)
export(dict)
export(import)
export(import_builtins)
export(import_from_path)
export(iter_next)
export(iterate)
export(np)
export(np_array)
export(py_eval)
export(py_get_item)
export(py_run_string)
export(py_to_r)
export(r_to_py)
export(shape)
export(torch)
export(torch_config)
export(torch_extract_opts)
export(torch_getLogger)
export(torch_size)
export(torch_version)
export(torchvision)
export(tuple)
export(use_condaenv)
export(use_python)
export(use_virtualenv)
import(R6)
import(logging)
import(methods)
import(reticulate)
importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(graphics,points)
importFrom(reticulate,array_reshape)
importFrom(reticulate,dict)
importFrom(reticulate,import)
importFrom(reticulate,import_from_path)
importFrom(reticulate,iterate)
importFrom(reticulate,np_array)
importFrom(reticulate,py_call)
importFrom(reticulate,py_capture_output)
importFrom(reticulate,py_get_attr)
importFrom(reticulate,py_has_attr)
importFrom(reticulate,py_is_null_xptr)
importFrom(reticulate,py_iterator)
importFrom(reticulate,py_run_file)
importFrom(reticulate,py_run_string)
importFrom(reticulate,py_to_r)
importFrom(reticulate,r_to_py)
importFrom(reticulate,tuple)
importFrom(utils,.DollarNames)
importFrom(utils,str)
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# rTorch 0.0.1
* July 21 2019
* alpha version
* first release to Github
* package coming after publication of `rpystats-apollo11`
* still examples to be added


# rTorch 0.0.0.9000

* Added a `NEWS.md` file to track changes to the package.
20 changes: 20 additions & 0 deletions R/datasets.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


#' MNIST database of handwritten digits
#'
#' Dataset of 60,000 28x28 grayscale images of the 10 digits, along with a test set of 10,000 images.
#'
#' @param ntrain number of training samples
#' @param ntest number of test samples
#' @param onehot boolean
#' @family datasets
#'
#' @export
dataset_mnist <- function(ntrain = 60000L, ntest = 10000L, onehot = TRUE) {
# import data_utils module
python_path <- system.file("python", package = "rTorch")
tools <- import_from_path("torchtools", path = python_path)
tools$data_util$load_mnist(ntrain, ntest, onehot)
}


Loading

0 comments on commit 8e8de99

Please sign in to comment.