-
Notifications
You must be signed in to change notification settings - Fork 0
/
SpecialMacTensorInstall.Rmd
45 lines (33 loc) · 1.08 KB
/
SpecialMacTensorInstall.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: "InstallMacTensorflow"
author: "Julin Maloof"
date: "1/13/2021"
output: html_document
---
There is a new optimized tensor flow available for Mac OS11 https://github.com/apple/tensorflow_macos
```{bash, eval=FALSE}
# run this in an actual terminal because it is interactive
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apple/tensorflow_macos/master/scripts/download_and_install.sh)"
# then copy over the file from the tmp directory to ~/bin in case you want to reuse it.
```
```{bash}
cd
rm -rf /Users/jmaloof/.virtualenvs/tensorflow_macos_venv/
~/bin/tensorflow_macos/install_venv.sh --python=/usr/local/opt/[email protected]/bin/python3 -y /Users/jmaloof/.virtualenvs/tensorflow_macos_venv/
. "/Users/jmaloof/.virtualenvs/tensorflow_macos_venv/bin/activate"
pip install keras
pip install h5py pyyaml requests Pillow scipy
```
```{r}
library(keras)
library(reticulate)
use_virtualenv("~/.virtualenvs/tensorflow_macos_venv/", required = TRUE )
py_module_available("tensorflow")
library(tensorflow)
```
```{r}
py_config()
```
```{r}
dataset <- dataset_boston_housing()
```