srihari-humbarwadi / YOLOv1-TensorFlow2.0

A tensorflow2.0 implementation of the YOLOv1 paper https://arxiv.org/pdf/1506.02640
46 stars 10 forks source link

def load_data(image_path, labels) is wrong? #2

Open 1996hxr opened 4 years ago

1996hxr commented 4 years ago

In line 200 def load_data(image_path, labels): flip = tf.cast(tf.random.uniform(shape[1,],minval=0,maxval=2,dtype=tf.int32),dtype=tf.bool).numpy()[0] return get_image(image_path), flip_labels(labels)#don't define flip_labels()?

OrangeAILab commented 4 years ago

in line 203 flip = tf.cast(tf.random.uniform(shape=[1, ], minval=0, maxval=2, dtype=tf.int32), dtype=tf.bool).numpy()[0] AttributeError: 'Tensor' object has no attribute 'numpy'

Li-yg commented 3 years ago

hey bro, do you konw how to solve this problem?

shaoxiang777 commented 3 years ago

Same problem as @NEUOrangeCat