## Problem

I'm running an Rmarkdown, using `reticulate`

to use a Python 3.7 environment I created with Conda. The problem I'm running into is during model fitting, RStudio Crashes.

## Reproducible Example

Terminal - Create Conda Environment

```
conda create -n py3.7 python=3.7 tensorflow scikit-learn pandas numpy matplotlib
```

## Rmarkdown

#### The R setup.

```
library(tidyverse)
library(reticulate)
use_condaenv("py3.7", required = TRUE)
```

#### Python in RMarkdown

This example comes from the Basic classification: Classify images of clothing

```
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
```

2.0.0

```
fashion_mnist = keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
```

```
model = keras.Sequential([
keras.layers.Flatten(input_shape=(28, 28)),
keras.layers.Dense(128, activation='relu'),
keras.layers.Dense(10)
])
```

```
model.compile(optimizer='adam',
loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
metrics=['accuracy'])
```

```
model.summary()
```

Here's where RStudio Crashes.

```
model.fit(train_images, train_labels, epochs=10)
```