1

我刚刚加入了 Google 的Magenta 项目,并且对生成示例 MIDI 感兴趣,如此所述。

我还不知道 python 也不知道命令行的正确语法,所以问题可能出在一些基本的东西上。但是,我试图用谷歌搜索所有可能的解决方案,但找不到任何东西。

(//anaconda/envs/magenta) bash-3.2$ source activate magenta

(magenta) bash-3.2$ melody_rnn_generate \
> --config=lookback_rnn \
> --bundle_file=/magenta/models/melody_rnn/lookback_rnn.mag \
> --output_dir=/personal/AI/generated \
> --num_outputs=10 \
> --num_steps=128 \
> --primer_melody="[60]"

bash: melody_rnn_generate: command not found

我通过 Anaconda 安装了 python-2.7 和 magenta 环境。

(magenta) bash-3.2$ python --version
Python 2.7.12 :: Continuum Analytics, Inc.
4

1 回答 1

0

洋红色需要 Python3.7。在我的带有 Python3.7 的 Unbuntu 20.04 中,这个命令成功地为我工作

2020-12-17 14:26:04.412813: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:From /home/chipl/miniconda3/envs/magenta/lib/python3.7/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-12-17 14:26:07.678088: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-12-17 14:26:07.678979: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2020-12-17 14:26:07.720420: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-12-17 14:26:07.720820: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: GeForce GTX 1650 computeCapability: 7.5
coreClock: 1.56GHz coreCount: 16 deviceMemorySize: 3.82GiB deviceMemoryBandwidth: 119.24GiB/s
2020-12-17 14:26:07.720847: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2020-12-17 14:26:07.723539: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2020-12-17 14:26:07.723603: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2020-12-17 14:26:07.724531: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2020-12-17 14:26:07.724805: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2020-12-17 14:26:07.724902: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory
2020-12-17 14:26:07.725501: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2020-12-17 14:26:07.725668: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2020-12-17 14:26:07.725683: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-12-17 14:26:07.726323: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-12-17 14:26:07.726351: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-12-17 14:26:07.726359: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      
2020-12-17 14:26:07.743668: W tensorflow/core/framework/op_def_util.cc:371] Op TensorArray is deprecated. It will cease to work in GraphDef version 16. Use TensorArrayV3.
2020-12-17 14:26:07.743861: W tensorflow/core/framework/op_def_util.cc:371] Op TensorArrayScatter is deprecated. It will cease to work in GraphDef version 19. Use TensorArrayGradV3.
2020-12-17 14:26:07.744069: W tensorflow/core/framework/op_def_util.cc:371] Op TensorArrayRead is deprecated. It will cease to work in GraphDef version 16. Use TensorArrayReadV3.
2020-12-17 14:26:07.744920: W tensorflow/core/framework/op_def_util.cc:371] Op TensorArrayWrite is deprecated. It will cease to work in GraphDef version 16. Use TensorArrayWriteV3.
2020-12-17 14:26:07.745023: W tensorflow/core/framework/op_def_util.cc:371] Op TensorArraySize is deprecated. It will cease to work in GraphDef version 16. Use TensorArraySizeV3.
2020-12-17 14:26:07.745097: W tensorflow/core/framework/op_def_util.cc:371] Op TensorArrayGather is deprecated. It will cease to work in GraphDef version 16. Use TensorArrayGatherV3.
WARNING:tensorflow:The saved meta_graph is possibly from an older release:
'model_variables' collection should be of type 'byte_list', but instead is of type 'node_list'.
W1217 14:26:07.772887 139643289851712 meta_graph.py:882] The saved meta_graph is possibly from an older release:
'model_variables' collection should be of type 'byte_list', but instead is of type 'node_list'.
INFO:tensorflow:Restoring parameters from /tmp/tmp0_6b5nxb/model.ckpt
I1217 14:26:07.773848 139643289851712 saver.py:1292] Restoring parameters from /tmp/tmp0_6b5nxb/model.ckpt
2020-12-17 14:26:07.776332: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:196] None of the MLIR optimization passes are enabled (registered 0 passes)
2020-12-17 14:26:07.779129: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2400000000 Hz
INFO:tensorflow:Beam search yields sequence with log-likelihood: -38.152328 
I1217 14:26:08.118769 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -38.152328 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -112.622917 
I1217 14:26:08.358586 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -112.622917 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -51.146992 
I1217 14:26:08.598800 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -51.146992 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -169.718277 
I1217 14:26:08.833375 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -169.718277 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -57.103535 
I1217 14:26:09.110141 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -57.103535 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -127.259666 
I1217 14:26:09.345808 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -127.259666 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -152.949905 
I1217 14:26:09.583750 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -152.949905 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -33.561901 
I1217 14:26:09.823456 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -33.561901 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -145.643631 
I1217 14:26:10.059700 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -145.643631 
INFO:tensorflow:Beam search yields sequence with log-likelihood: -74.243912 
I1217 14:26:10.301244 139643289851712 events_rnn_model.py:381] Beam search yields sequence with log-likelihood: -74.243912 
INFO:tensorflow:Wrote 10 MIDI files to /media/chipl/Storage/MusicAI/Lab_Magenta/generated
I1217 14:26:10.307783 139643289851712 melody_rnn_generate.py:217] Wrote 10 MIDI files to /media/chipl/Storage/MusicAI/Lab_Magenta/generated

于 2020-12-17T07:44:28.390 回答