OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Permission denied: model/variables/variables_t emp; Permission denied

2021-06-01 10:32:15.183997: W tensorflow/python/util/util.cc:348] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using
 them.
2021-06-01 10:32:15.639234: W tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Permission denied: model/variables/variables_t
emp; Permission denied
test_loss: 0.2585081160068512     test_accuracy: 0.9662961959838867
Traceback (most recent call last):
  File "human_attention.py", line 94, in <module>
    network.save('model')
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 2001, in save
    save.save_model(self, filepath, overwrite, include_optimizer, save_format,
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/keras/saving/save.py", line 156, in save_model
    saved_model_save.save(model, filepath, overwrite, include_optimizer,
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/keras/saving/saved_model/save.py", line 89, in save
    save_lib.save(model, filepath, signatures, options)
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/saved_model/save.py", line 1041, in save
    object_saver.save(
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 1216, in save
    save_path, new_feed_additions = self._save_cached_when_graph_building(
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 1162, in _save_cached_when_graph_building
    save_op = saver.save(file_prefix, options=options)
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 300, in save
    return save_fn()
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 274, in save_fn
    sharded_saves.append(saver.save(shard_prefix, options))
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 83, in save
    return io_ops.save_v2(file_prefix, tensor_names, tensor_slices, tensors)
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1714, in save_v2
    return save_v2_eager_fallback(
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1735, in save_v2_eager_fallback
    _result = _execute.execute(b"SaveV2", 0, inputs=_inputs_flat, attrs=_attrs,
  File "/home/user123/anaconda3/envs/py385/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.PermissionDeniedError: model/variables/variables_temp; Permission denied [Op:SaveV2]



原文地址:https://www.cnblogs.com/emanlee/p/14837589.html