Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error: type mismatch in vgg/ssd_base.py (float32 vs int32) #9

Open
CorvusCorax opened this issue Jan 25, 2017 · 4 comments
Open

Comments

@CorvusCorax
Copy link

CorvusCorax commented Jan 25, 2017

I tried to run this both on the desktop and on a Jetson TX1, tensorflow 0.12.1 as well as 1.0a0 (both compiled form source)

I get a type mismatch error when running trainer.py in

npy file loaded
build model started
Traceback (most recent call last):
  File "trainer.py", line 407, in <module>
    start_train()
  File "trainer.py", line 236, in start_train
    ssd = SSD()
  File "trainer.py", line 32, in __init__
    self.imgs_ph, self.bn, self.output_tensors, self.pred_labels, self.pred_locs = model.model(self.sess)
  File "/home/raven/src/ssd_tensorflow/model.py", line 13, in model
    vgg.build(images)
  File "/home/raven/src/ssd_tensorflow/vgg/ssd_base.py", line 35, in build
    red, green, blue = tf.split(3, 3, rgb_scaled)
  File "/home/raven/.local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1222, in split
    split_dim=axis, num_split=num_or_size_splits, value=value, name=name)
  File "/home/raven/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3426, in _split
    num_split=num_split, name=name)
  File "/home/raven/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 509, in apply_op
    (prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.


@chenweiqian
Copy link

I also met this problem.Did you slove it? Thanks! @CorvusCorax

@CorvusCorax
Copy link
Author

unfortunately not. I had to backbench this issue for now. I have near zero experience with tensorflow, so my personal workaround was to run caffe instead ;)

I was hoping @seann999 could help with this.

@chenweiqian
Copy link

@CorvusCorax today I sloved it.
replace tf.split(3, 3, rgb_scaled) with tf.split(rgb_scaled, 3, 3) .

@hjptriplebee
Copy link

tf.split in tensorflow 1.0 version has been changed,
so replace tf.split(3, 3, rgb_scaled) with tf.split(rgb_scaled, 3, 3) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants