databricks / spark-deep-learning

Deep Learning Pipelines for Apache Spark
https://databricks.github.io/spark-deep-learning
Apache License 2.0
1.99k stars 494 forks source link

Updated to tensorframes==0.4.0 (tensorflow 1.6) and Keras 2.1.5. #105

Closed tomasatdatabricks closed 6 years ago

tomasatdatabricks commented 6 years ago

import tensorflow as tf tf.version '1.6.0' import numpy as np def simple_graph(): ... g = tf.Graph() ... with g.as_default(): ... x = tf.placeholder(tf.float32, [1], name = 'x') ... x /= 127.5 ... x -= 1 ... return (g, x) ...

def make_and_run_simple_graph(): ... g, x = simple_graph() ... return tf.Session(graph = g).run(x, feed_dict = {'x:0':np.array([55], dtype = np.float32)}) ...

tst = make_and_run_simple_graph() 2018-03-26 14:29:40.269905: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA a = np.array([55], dtype= np.float32) b = np.array([127.5], dtype= np.float32) c = np.array([1], dtype= np.float32) tst = make_and_run_simple_graph() tst - (a/b - c) array([ 5.96046448e-08], dtype=float32)

smurching commented 6 years ago

Thanks for the PR! Looking now :)

codecov-io commented 6 years ago

Codecov Report

Merging #105 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #105   +/-   ##
=======================================
  Coverage   82.84%   82.84%           
=======================================
  Files          34       34           
  Lines        1999     1999           
  Branches       44       44           
=======================================
  Hits         1656     1656           
  Misses        343      343
Impacted Files Coverage Δ
src/main/scala/com/databricks/sparkdl/Models.scala 85% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e3c5876...9df37a4. Read the comment docs.