This repository contains material for a tensorflor-keras tutorial, part of the "Deep learning for climate modeling seminar".
We first need a tensorflow/keras development environment. These steps walk you through setting up an environment using Python 3.6.
- First we need to create a new environment
conda create --name keras
- Now we need to activate our environment
source activate keras
- Now let’s import all the modules we will use:
- This is so we can work with NetCDF files
conda install -c conda-forge xarray
- This is so we can make plots
conda install -c conda-forge matplotlib
- This is so we can use TensorFlow and Keras
conda install -c conda-forge tensorflow
- This is a nice machine learning library.
conda install -c conda-forge scikit-learn
- This is so our environment can be a Jupyter kernel
conda install ipykernel
- This is so we can work with NetCDF files
- Now make your new environment a Jupyter kernel:
python -m ipykernel install --user --name keras --display-name "keras"
- Now open a Jupyter notebook and make sure you can import everything. You may need to change to your new keras kernel:
import xarray as xr
import numpy as np
import sklearn as sk
import tensorflow as tf
from tensorflow import keras
This is a collection of examples using the keras API. Notebooks can be accessed and modified via binder here
This contains documentation files: