Weakly_detector
Weakly_detector copied to clipboard
TypeError: 'map' object is not subscriptable
@jazzsaxmafia Hello,
:\Tesnsorflow\Weaklydetector\src>python train.caltech.py
Traceback (most recent call last):
File "train.caltech.py", line 44, in
:\Tesnsorflow\Weaklydetector\src>python train.caltech.py
Traceback (most recent call last):
File "train.caltech.py", line 40, in
Any idea of this problem? Thank you very much.
Hello,I have a question.Where is the "caffe_layers_value.pickle"?
I have the same issue,
@my1347 add list before map, just like list(map()), you can solve your problems.
@YangBain already do that, but it didn't work
I know this is a few months old, but I just encountered same issue and fixed.
@my1347 did you do it for the lines before np.hstack? image_paths_per_label is a map and trying to be subscribed in the next line, so the list conversion also has to happen on the preceeding line as well.
@eanderson4 I use python3.5.4 ,modified like this: image_paths_per_label = list(map(lambda one_dir: map(lambda one_file: os.path.join( dataset_path, one_dir, one_file ), os.listdir( os.path.join( dataset_path, one_dir))), image_dir_list)) image_paths_train = np.hstack(list(map(lambda one_class: one_class[:-10], image_paths_per_label)))
it still do not work ,same problem
@lz666win In that line there are two map (which is marked bold below) , if you replace that also with list(map) it works
image_paths_per_label = list(map(lambda one_dir: map(lambda one_file: os.path.join( dataset_path, one_dir, one_file ), os.listdir( os.path.join( dataset_path, one_dir))), image_dir_list))
same issue
I know this is a few months old, but I just encountered same issue and fixed.
@my1347 did you do it for the lines before np.hstack? image_paths_per_label is a map and trying to be subscribed in the next line, so the list conversion also has to happen on the preceeding line as well.
can more explain to me how can i do to fix the issue?