world-ecoregion/nn.py

30 lines
582 B
Python
Raw Normal View History

2019-02-03 05:34:28 +00:00
from __future__ import absolute_import, division, print_function
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
2019-02-03 05:34:28 +00:00
from utils import *
tf.enable_eager_execution()
df = pd.read_pickle('data_final.p')
# print(df.head())
# dataset = dataframe_to_dataset_biomes(df)
dataset = dataframe_to_dataset_temp_precip(df)
i = 0
for feature, target in dataset:
i += 1
if i > 10:
break
print('{} => {}'.format(feature, target))
2019-02-03 05:34:28 +00:00
print(tf.__version__)