tf-coriander: `split` failing
Relevant test:
def test_split():
shape = (12, 1)
graph = tf.Graph()
with graph.as_default():
with tf.device('/gpu:0'):
a_tf = tf.placeholder(tf.float32, shape)
c_tf = tf.split(0, 4, a_tf)
sess = tf.Session()
with sess.as_default():
a = np.random.randn(*shape).astype(np.float32)
c = sess.run(c_tf, feed_dict={a_tf: a})
if(np.prod(shape)) < 20:
print('a', a)
print('c', c)
Result:
a [[ 0.039643 ]
[ 1.02737081]
[-1.39692032]
[-0.08065519]
[ 0.77159059]
[ 1.21571183]
[ 0.12854558]
[ 3.13103628]
[-0.31965023]
[-0.41063583]
[-1.0400176 ]
[ 0.10558813]]
c [array([[ nan],
[ nan],
[ nan]], dtype=float32), array([[ nan],
[ nan],
[ nan]], dtype=float32), array([[ nan],
[ nan],
[ nan]], dtype=float32), array([[ nan],
[ nan],
[ nan]], dtype=float32)]
(should not be nans…)
Update: looks like this involves passing a float ** into the kernel 😛 . THis is one of the kernel parameters:
struct tensorflow__CudaDeviceArrayStruct {
int f0;
float* f1[8];
global float** f2;
};
(in bytecode:
%"struct.tensorflow::CudaDeviceArrayStruct" = type { i32, [8 x float*], float** }
)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 41 (35 by maintainers)
https://github.com/hughperkins/tf-coriander/releases/tag/v0.18.2
Wheee! split working in https://github.com/hughperkins/coriander/commit/98e2526727482de3e5edd6e897179a1d7b08015e 😮
It’s a “bit” spammy, and I need to commit the changes to
tf-corianderand so on, but seems promising to me 😃