前提・実現したいこと
tensorflow、magenta(楽曲生成ライブリ)を使用し、自動楽曲生成をしたいです。
発生している問題・エラーメッセージ
コマンド実行中に、パーミッションエラーが出てしまっています。
エラーのファイルをみると、shutil.pyというファイルのファイルを読み込み権限したところでパーミッションエラーがでているところまでは理解できました。
ですが、標準ライブラリ?というか共通のファイルだと思うので、shutil.pyでのエラーが考えにくく、
ファイル権限や管理者権限での実行を試しましたが全く分からなく、、
教えていただけませんでしょうか。。
(base) C:\Users\Administrator>performance_rnn_generate ^ More? --config=multiconditioned_performance_with_dynamics ^ More? --bundle_file=C:\Users\Administrator\Documents\AIvirtualmusic\multiconditioned_performance_with_dynamics.mag ^ More? --output_dir=C:\Users\Administrator\Documents\AIvirtualmusic\sample ^ More? --num_outputs=10 ^ More? --num_steps=3000 ^ More? --notes_per_second=4 ^ More? --pitch_class_histogram="[2, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1]" ^ More? --primer_pitches="[71,67,64,60]" 2020-06-27 12:22:37.978807: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll WARNING:tensorflow:From c:\programdata\anaconda3\lib\site-packages\tensorflow\python\compat\v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term 2020-06-27 12:22:41.288246: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2020-06-27 12:22:41.367721: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce RTX 2060 computeCapability: 7.5 coreClock: 1.68GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s 2020-06-27 12:22:41.367840: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll 2020-06-27 12:22:41.373905: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll 2020-06-27 12:22:41.377125: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll 2020-06-27 12:22:41.966826: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0: N 2020-06-27 12:22:41.967443: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4729 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2060, pci bus id: 0000:01:00.0, compute capability: 7.5) 2020-06-27 12:22:41.970803: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x21e5b317360 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2020-06-27 12:22:41.970881: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce RTX 2060, Compute Capability 7.5 INFO:tensorflow:Restoring parameters from C:\Users\ADMINI~1\AppData\Local\Temp\tmpru9djg85\model.ckpt I0627 12:22:42.155020 9804 saver.py:1293] Restoring parameters from C:\Users\ADMINI~1\AppData\Local\Temp\tmpru9djg85\model.ckpt INFO:tensorflow:Need to generate 2949 more steps for this sequence, will try asking for 472 RNN steps I0627 12:22:42.351563 9804 performance_sequence_generator.py:240] Need to generate 2949 more steps for this sequence, will try asking for 472 RNN steps 2020-06-27 12:22:42.372767: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll INFO:tensorflow:Beam search yields sequence with log-likelihood: -1197.357300 I0627 12:22:43.495029 9804 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -1197.357300 INFO:tensorflow:Need to generate 1120 more steps for this sequence, will try asking for 180 RNN steps I0627 12:22:43.496013 9804 performance_sequence_generator.py:240] Need to generate 1120 more steps for this sequence, will try asking for 180 RNN steps INFO:tensorflow:Beam search yields sequence with log-likelihood: -1571.538330 I0627 12:22:44.054311 9804 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -1571.538330 INFO:tensorflow:Need to generate 374 more steps for this sequence, will try asking for 60 RNN steps I0627 12:22:44.055281 9804 performance_sequence_generator.py:240] Need to generate 374 more steps for this sequence, will try asking for 60 RNN steps INFO:tensorflow:Beam search yields sequence with log-likelihood: -1679.903442 I0627 12:22:44.501518 9804 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -1679.903442 INFO:tensorflow:Need to generate 112 more steps for this sequence, will try asking for 18 RNN steps I0627 12:22:44.503512 9804 performance_sequence_generator.py:240] Need to generate 112 more steps for this sequence, will try asking for 18 RNN steps INFO:tensorflow:Beam search yields sequence with log-likelihood: -1715.293213 I0627 12:22:44.970277 9804 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -1715.293213 INFO:tensorflow:Need to generate 80 more steps for this sequence, will try asking for 13 RNN steps I0627 12:22:44.972363 9804 performance_sequence_generator.py:240] Need to generate 80 more steps for this sequence, will try asking for 13 RNN steps INFO:tensorflow:Beam search yields sequence with log-likelihood: -1747.813232 I0627 12:22:45.388950 9804 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -1747.813232 Traceback (most recent call last): File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\programdata\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\Scripts\performance_rnn_generate.exe\__main__.py", line 7, in <module> File "c:\programdata\anaconda3\lib\site-packages\magenta\models\performance_rnn\performance_rnn_generate.py", line 290, in console_entry_point tf.app.run(main) File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "c:\programdata\anaconda3\lib\site-packages\absl\app.py", line 299, in run _run_main(main, args) File "c:\programdata\anaconda3\lib\site-packages\absl\app.py", line 250, in _run_main sys.exit(main(argv)) File "c:\programdata\anaconda3\lib\site-packages\magenta\models\performance_rnn\performance_rnn_generate.py", line 285, in main run_with_flags(generator) File "c:\programdata\anaconda3\lib\site-packages\magenta\models\performance_rnn\performance_rnn_generate.py", line 248, in run_with_flags note_seq.sequence_proto_to_midi_file(generated_sequence, midi_path) File "c:\programdata\anaconda3\lib\site-packages\note_seq\midi_io.py", line 373, in sequence_proto_to_midi_file drop_events_n_seconds_after_last_note) File "c:\programdata\anaconda3\lib\site-packages\note_seq\midi_io.py", line 218, in note_sequence_to_midi_file copyfile(temp_file.name, output_file) File "c:\programdata\anaconda3\lib\shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: PermissionError: [Errno 13] Permission denied: 'C:\Users\ADMINI~1\AppData\Local\Temp\tmpn64j79d8' (base) C:\Users\Administrator>
該当のソースコード
python
1performance_rnn_generate ^ 2--config=multiconditioned_performance_with_dynamics ^ 3--bundle_file=C:\Users\Administrator\Documents\AIvirtualmusic\multiconditioned_performance_with_dynamics.mag ^ 4--output_dir=C:\Users\Administrator\Documents\AIvirtualmusic\sample ^ 5--num_outputs=10 ^ 6--num_steps=3000 ^ 7--notes_per_second=4 ^ 8--pitch_class_histogram="[2, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1]" ^ 9--primer_pitches="[71,67,64,60]"
試したこと
・管理者権限での実行
・ファイル権限の確認
を行いましたが、他サイトでの解決策では私の環境では解決できなかったため、皆様のお力を借りられたらと思っています。。
回答1件
あなたの回答
tips
プレビュー