fork download
  1. import tensorflow as tf
  2. import numpy as np
  3. import sys
  4. print(sys.version)
  5.  
  6. x = [10, 20, 50, 60, 30, 40, 70, 80];
  7.  
  8. gfg, geeks = tf.split(x, num_or_size_splits=2, axis=-1);
  9.  
  10. sess = tf.Session()
  11. gfg_v,geeks_v = sess.run([gfg, geeks])
  12.  
  13. print gfg_v;
  14. print gfg_v.shape;
  15. print geeks_v;
  16. print geeks_v.shape;
  17.  
  18.  
Success #stdin #stdout 1.14s 205632KB
stdin
Standard input is empty
stdout
2.7.16 (default, Apr  6 2019, 01:42:57) 
[GCC 8.3.0]
[10 20 50 60]
(4,)
[30 40 70 80]
(4,)