salesforce / densecap

BSD 3-Clause "New" or "Revised" License
188 stars 61 forks source link

AttributeError: 'numpy.ndarray' object has no attribute 'append' #20

Closed jasonseu closed 5 years ago

jasonseu commented 5 years ago

https://github.com/salesforce/densecap/blob/1f6189c90ae8d7fd006c6d2394e9553bf1a614ac/model/action_prop_dense_cap.py#L467

Hey, I think you have made a mistake here. The variable pred_results is the object of np.ndarray, which have no append method.

LuoweiZhou commented 5 years ago

Hi @jasonseu, thank you for the feedback. It should be pred_results[0] = np.array([0, min(original_frame_len, T), pos_thresh]) instead and seems that loop is never executed. Will fix.

jasonseu commented 5 years ago

@LuoweiZhou Yes, I think so, otherwise your code will not run successfully.