Open ShreyaKashi opened 5 years ago
even i am facing the same problem.. cud u find the reason and the solution??
Hi guys, I'm also facing the same issue. Did you find a proper solution?
it happens when the neg_sample
tuple is [[1 0 ]]
only. It's not the most clever idea, but I added an exception catch for skipping such sample and continue for using another one
if C.num_rois > 1:
if len(pos_samples) < C.num_rois//2:
selected_pos_samples = pos_samples.tolist()
else:
selected_pos_samples = np.random.choice(
pos_samples, C.num_rois//2, replace=False).tolist()
try:
selected_neg_samples = np.random.choice(
neg_samples, C.num_rois - len(selected_pos_samples), replace=False).tolist()
except ValueError:
try:
selected_neg_samples = np.random.choice(
neg_samples, C.num_rois - len(selected_pos_samples), replace=True).tolist()
except:
# The neg_samples is [[1 0 ]] only, therefore there's no negative sample
continue
a
in the error is the parameter definition used in np.random.choice: https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.choice.html
Parameters: | a : 1-D array-like or intIf an ndarray, a random sample is generated from its elements. If an int, the random sample is generated as if a were np.arange(a)
I ran the script train_frcnn.py to identify water bodies in an image using the following command
Even though the model is working to some extent, I'm getting this message
Can anyone tell me why?
Here's the traceback
Kindly let me know if more information is required to answer this. Thanks in advance :)