这是我的代码:
44 scores = tf.boolean_mask(box_class_scores,filtering_mask,axis=-1)
45 boxes = tf.boolean_mask(boxes,filtering_mask,axis=-1)
46 classes = tf.boolean_mask(box_classes,filtering_mask,axis=-1)
错误,我得到:
TypeError: boolean_mask() got an unexpected keyword argument 'axis'
tf.boolean_mask()
不接受轴参数,但它是一个有效的参数,如文档中所示:https://www.tensorflow.org/api_docs/python/tf/boolean_mask
最佳答案
如果您从函数中删除 axis
参数,它将起作用。您收到的错误将得到解决。
关于python - tf.boolean_mask 不接受轴参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54966581/