1. 25 6月, 2020 5 次提交
    • T
      dnn_backend_native_layer_mathunary: add atan support · 13f5613e
      Ting Fu 提交于
      It can be tested with the model generated with below python script:
      
      import tensorflow as tf
      import numpy as np
      import imageio
      
      in_img = imageio.imread('input.jpeg')
      in_img = in_img.astype(np.float32)/255.0
      in_data = in_img[np.newaxis, :]
      
      x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
      x1 = tf.atan(x)
      x2 = tf.divide(x1, 3.1416/4) # pi/4
      y = tf.identity(x2, name='dnn_out')
      
      sess=tf.Session()
      sess.run(tf.global_variables_initializer())
      
      graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
      tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False)
      
      print("image_process.pb generated, please use \
      path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n")
      
      output = sess.run(y, feed_dict={x: in_data})
      imageio.imsave("out.jpg", np.squeeze(output))
      Signed-off-by: NTing Fu <ting.fu@intel.com>
      Signed-off-by: 郭叶军's avatarGuo Yejun <yejun.guo@intel.com>
      13f5613e
    • T
      dnn-layer-math-unary-test: add unit test for acos · 130c6001
      Ting Fu 提交于
      Signed-off-by: NTing Fu <ting.fu@intel.com>
      Signed-off-by: 郭叶军's avatarGuo Yejun <yejun.guo@intel.com>
      130c6001
    • T
      dnn_backend_native_layer_mathunary: add acos support · 461485fe
      Ting Fu 提交于
      It can be tested with the model generated with below python script:
      
      import tensorflow as tf
      import numpy as np
      import imageio
      
      in_img = imageio.imread('input.jpeg')
      in_img = in_img.astype(np.float32)/255.0
      in_data = in_img[np.newaxis, :]
      
      x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
      x1 = tf.acos(x)
      x2 = tf.divide(x1, 3.1416/2) # pi/2
      y = tf.identity(x2, name='dnn_out')
      
      sess=tf.Session()
      sess.run(tf.global_variables_initializer())
      
      graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
      tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False)
      
      print("image_process.pb generated, please use \
      path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n")
      
      output = sess.run(y, feed_dict={x: in_data})
      imageio.imsave("out.jpg", np.squeeze(output))
      Signed-off-by: NTing Fu <ting.fu@intel.com>
      Signed-off-by: 郭叶军's avatarGuo Yejun <yejun.guo@intel.com>
      461485fe
    • T
      dnn-layer-math-unary-test: add unit test for asin · 057f6ee7
      Ting Fu 提交于
      Signed-off-by: NTing Fu <ting.fu@intel.com>
      Signed-off-by: 郭叶军's avatarGuo Yejun <yejun.guo@intel.com>
      057f6ee7
    • T
      dnn_backend_native_layer_mathunary: add asin support · 486c0c41
      Ting Fu 提交于
      It can be tested with the model generated with below python script:
      
      import tensorflow as tf
      import numpy as np
      import imageio
      
      in_img = imageio.imread('input.jpeg')
      in_img = in_img.astype(np.float32)/255.0
      in_data = in_img[np.newaxis, :]
      
      x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
      x1 = tf.asin(x)
      x2 = tf.divide(x1, 3.1416/2) # pi/2
      y = tf.identity(x2, name='dnn_out')
      
      sess=tf.Session()
      sess.run(tf.global_variables_initializer())
      
      graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
      tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False)
      
      print("image_process.pb generated, please use \
      path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n")
      
      output = sess.run(y, feed_dict={x: in_data})
      imageio.imsave("out.jpg", np.squeeze(output))
      Signed-off-by: NTing Fu <ting.fu@intel.com>
      Signed-off-by: 郭叶军's avatarGuo Yejun <yejun.guo@intel.com>
      486c0c41
  2. 24 6月, 2020 7 次提交
  3. 23 6月, 2020 4 次提交
  4. 22 6月, 2020 20 次提交
  5. 21 6月, 2020 4 次提交