TF Slim:在排除范围上进行微调mobilenet v2

时间:2018-06-29 00:59:00

标签: tensorflow machine-learning tf-slim transfer-learning

我有两个问题: 请参阅:TF Slim: Fine Tune mobilenet v2 on custom dataset

答案要求排除范围: --checkpoint_exclude_scopes = MobilenetV2 / Logits,MobilenetV2 / Predictions,MobilenetV2 / predics \

对于我来说,我遇到了以下错误:

  File "/usr/local/lib/python3.5/dist- packages/tensorflow/python/training/saver.py", line 1338, in __init__
self.build()
 File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1347, in build
  self._build(self._filename, build_save=True, build_restore=True)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1384, in _build
  build_save=build_save, build_restore=build_restore)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 813, in _build_internal
  saveables = self._ValidateAndSliceInputs(names_to_saveables)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 661, in _ValidateAndSliceInputs
  names_to_saveables = BaseSaverBuilder.OpListToDict(names_to_saveables)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 638, in OpListToDict
name)
  ValueError: At least two variables have the same name: 
  MobilenetV2/Conv/BatchNorm/beta

虽然我确实排除了对我有用的“ MobilenetV2 / Logits”。我错了吗?

0 个答案:

没有答案