gossipnet icon indicating copy to clipboard operation
gossipnet copied to clipboard

Problem with Makefile

Open Firyuza opened this issue 6 years ago • 12 comments

Hello! I did make and in terminal I just saw the warnings, no errors. But when I tried to debug train.py I get such error: tensorflow.python.framework.errors_impl.NotFoundError: ~/nms_net/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE

Thanks!

Firyuza avatar Mar 23 '18 17:03 Firyuza

Sounds like you have linking problems. Can you double check you're linking to the tensorflow you're running it in?

hosang avatar Mar 24 '18 20:03 hosang

I changed this variable TF_INC="/home/firiuza/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/include" in Makefile. So I think I have the right link.

Thanks!

Firyuza avatar Mar 24 '18 20:03 Firyuza

@Firyuza Did you fix the problem?

EkaterinaPogodina avatar May 14 '18 13:05 EkaterinaPogodina

@EkaterinaPogodina Unfortunately, I couldn't fix it. But I converted this C++ code that requires build into Tensorflow.

Firyuza avatar May 14 '18 13:05 Firyuza

You did the matching with tf ops? Sounds great! Can you share that?

hosang avatar May 28 '18 06:05 hosang

I had to compile roi pooling layer with "-D_GLIBCXX_USE_CXX11_ABI=0" parameter due to GCC version >= 5 to avoid this issue.

gudovskiy avatar May 30 '18 01:05 gudovskiy

@hosang I'm not sure that I did right conversion, but I tested it and it works. Hope you will understand my code, because it's not so easy to read :(

matching loss

find the ground truth box for each detection that has maximum IoU

max_ious = tf.reduce_max(self.det_anno_iou, axis=1)
iou_threshold = tf.fill(tf.shape(max_ious), 0.5)

add extra item at the end of tensor for labels and weights

gt_crowd_added = tf.concat([tf.expand_dims(self.gt_crowd, 1), tf.expand_dims([tf.constant(False)], 1)],
                           axis=0)
gt_crowd_added = tf.reshape(gt_crowd_added, [-1])

save indices of ground truth that match to detections

no_matched =  tf.fill(tf.shape(max_ious), tf.constant(-1, dtype=tf.int64))
self.det_gt_matching = tf.where(tf.greater(max_ious, iou_threshold),
                                tf.argmax(self.det_anno_iou, axis=1),
                                no_matched)

add extra item at the end of tensor for labels and weights

extra_ids = tf.fill(tf.shape(max_ious),
                                         tf.cast(tf.shape(self.gt_crowd)[0], dtype=tf.int64))
det_gt_matching_added = tf.where(tf.greater(max_ious, iou_threshold),
                                 tf.argmax(self.det_anno_iou, axis=1),
                                 extra_ids)
self.labels = tf.where(tf.not_equal(det_gt_matching_added, extra_ids),
                       tf.ones_like(max_ious, dtype=tf.float32),
                       tf.zeros_like(max_ious, dtype=tf.float32))
self.weights = tf.where(tf.gather(gt_crowd_added, det_gt_matching_added),
                        tf.zeros_like(max_ious),
                        tf.ones_like(max_ious))

Firyuza avatar Jun 04 '18 15:06 Firyuza

@hosang is there any dependency on the Tensorflow version ?

AshStuff avatar Sep 30 '18 08:09 AshStuff

I use the following tf version, which fixes a lot of issues. FYI. pip install tensorflow-gpu==0.12.1

amsword avatar Dec 16 '18 08:12 amsword

@hosang I also have the same error. Is there any dependency on the Tensorflow version?

symechar avatar Dec 30 '18 00:12 symechar

If it is of any help, here is what worked for me (TensorFlow 1.14) Issue #12 .

SchroeterJulien avatar Aug 05 '20 21:08 SchroeterJulien

@SchroeterJulien Please see https://github.com/hosang/gossipnet/issues/14, I successfully run the code (TF 1.12.0)

UpCoder avatar Aug 17 '20 07:08 UpCoder