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

Update to tensorflow 1.6 and Keras 2.1.5 #110

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)

codecov-io commented 6 years ago

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #110   +/-   ##
=======================================
  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...db484d3. Read the comment docs.

tomasatdatabricks commented 6 years ago

Thanks for the review Sid!

Yes, we need to do that and yes we should get all of the #106, #108 and #109 in before releasing 1.0. All of this makes the name of this PR confusing => I'll change that :)

tomasatdatabricks commented 6 years ago

The model files are different but they do produce identical results. At least on our test images.