TypeError: can't pickle dict_values objects

Posted herd

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TypeError: can't pickle dict_values objects相关的知识,希望对你有一定的参考价值。

Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.

See @{tf.nn.softmax_cross_entropy_with_logits_v2}.

N:Anaconda3installenvszhouying2libsite-packages ensorflowpythonopsgradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2020-04-11 11:23:00.226436: I T:srcgithub ensorflow ensorflowcoreplatformcpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
creating index...
index created!
2020-04-11 11:45:29.830021: W T:srcgithub ensorflow ensorflowcoreframeworkop_kernel.cc:1306] Invalid argument: TypeError: can‘t pickle dict_values objects
Traceback (most recent call last):

File "N:Anaconda3installenvszhouying2libsite-packages ensorflowpythonopsscript_ops.py", line 158, in __call__
ret = func(*args)

File "N:Anaconda3installenvszhouying2libsite-packagesobject_detection-0.1-py3.6.eggobject_detectionmetricscoco_evaluation.py", line 358, in first_value_func
self._metrics = self.evaluate()

File "N:Anaconda3installenvszhouying2libsite-packagesobject_detection-0.1-py3.6.eggobject_detectionmetricscoco_evaluation.py", line 207, in evaluate
self._detection_boxes_list)

File "N:Anaconda3installenvszhouying2libsite-packagesobject_detection-0.1-py3.6.eggobject_detectionmetricscoco_tools.py", line 118, in LoadAnnotations
results.dataset[‘categories‘] = copy.deepcopy(self.dataset[‘categories‘])

File "N:Anaconda3installenvszhouying2libcopy.py", line 169, in deepcopy
rv = reductor(4)

TypeError: can‘t pickle dict_values objects

 

 

F:TensorflowProjectObjectDetectionmodels-1.12.0 esearchobject_detectionmetrics

coco_tools.py  118行

#results.dataset[‘categories‘] = copy.deepcopy(self.dataset[‘categories‘])
results.dataset[‘categories‘] = copy.deepcopy(list(self.dataset[‘categories‘]))

 

以上是关于TypeError: can't pickle dict_values objects的主要内容,如果未能解决你的问题,请参考以下文章

TypeError: can't pickle dict_values objects

TypeError: data argument can't be an iterator

TypeError: can't convert console.log(...) to primitive type

TypeError: can't compare offset-naive and offset-aware datetimes bugfix

python3.4.0 input Can't convert 'int' object to str implicitly 如何正确输出?

TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to