質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.35%
Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Unity3D

Unity3Dは、ゲームや対話式の3Dアプリケーション、トレーニングシュミレーション、そして医学的・建築学的な技術を可視化する、商業用の開発プラットフォームです。

Q&A

0回答

782閲覧

ml-agentsの学習を開始できない。

R_Defrozen_

総合スコア1

Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Unity3D

Unity3Dは、ゲームや対話式の3Dアプリケーション、トレーニングシュミレーション、そして医学的・建築学的な技術を可視化する、商業用の開発プラットフォームです。

0グッド

0クリップ

投稿2021/02/08 05:59

編集2021/02/08 06:00

ml-agentsで学習を開始しようとした所、以下のようなエラーが出ました

Traceback (most recent call last):
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\trainer_controller.py", line 176, in start_learning
n_steps = self.advance(env_manager)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\trainer_controller.py", line 234, in advance
new_step_infos = env_manager.get_steps()
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\env_manager.py", line 113, in get_steps
new_step_infos = self._step()
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\subprocess_env_manager.py", line 264, in _step
self._queue_steps()
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\subprocess_env_manager.py", line 257, in _queue_steps
env_action_info = self._take_step(env_worker.previous_step)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\subprocess_env_manager.py", line 378, in _take_step
all_action_info[brain_name] = self.policies[brain_name].get_action(
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\policy\torch_policy.py", line 212, in get_action
run_out = self.evaluate(
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\policy\torch_policy.py", line 178, in evaluate
action, log_probs, entropy, memories = self.sample_actions(
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\policy\torch_policy.py", line 138, in sample_actions
actions, log_probs, entropies, memories = self.actor_critic.get_action_stats(
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\torch\networks.py", line 509, in get_action_stats
action, log_probs, entropies, actor_mem_out = super().get_action_stats(
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\torch\networks.py", line 318, in get_action_stats
action, log_probs, entropies = self.action_model(encoding, masks)
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\torch\action_model.py", line 195, in forward
log_probs, entropies = self._get_probs_and_entropy(actions, dists)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\torch\action_model.py", line 134, in _get_probs_and_entropy
entropies = torch.cat(entropies_list, dim=1)
RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CPU, CUDA, QuantizedCPU, BackendSelect, Named, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, Autocast, Batched, VmapMode].

CPU: registered at aten\src\ATen\CPUType.cpp:2127 [kernel]
CUDA: registered at aten\src\ATen\CUDAType.cpp:2983 [kernel]
QuantizedCPU: registered at aten\src\ATen\QuantizedCPUType.cpp:297 [kernel]
BackendSelect: fallthrough registered at ..\aten\src\ATen\core\BackendSelectFallbackKernel.cpp:3 [backend fallback]
Named: registered at ..\aten\src\ATen\core\NamedRegistrations.cpp:7 [backend fallback]
AutogradOther: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
AutogradCPU: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
AutogradCUDA: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
AutogradXLA: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
AutogradPrivateUse1: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
AutogradPrivateUse2: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
AutogradPrivateUse3: registered at ..\torch\csrc\autograd\generated\VariableType_2.cpp:8078 [autograd kernel]
Tracer: registered at ..\torch\csrc\autograd\generated\TraceType_2.cpp:9654 [kernel]
Autocast: registered at ..\aten\src\ATen\autocast_mode.cpp:258 [kernel]
Batched: registered at ..\aten\src\ATen\BatchingRegistrations.cpp:511 [backend fallback]
VmapMode: fallthrough registered at ..\aten\src\ATen\VmapModeRegistrations.cpp:33 [backend fallback]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\yukkuri\Scripts\mlagents-learn-script.py", line 33, in <module>
sys.exit(load_entry_point('mlagents', 'console_scripts', 'mlagents-learn')())
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\learn.py", line 280, in main
run_cli(parse_command_line())
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\learn.py", line 276, in run_cli
run_training(run_seed, options)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\learn.py", line 153, in run_training
tc.start_learning(env_manager)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\trainer_controller.py", line 201, in start_learning
self._save_models()
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\trainer_controller.py", line 84, in _save_models
self.trainers[brain_name].save_model()
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\trainer\rl_trainer.py", line 215, in save_model
model_checkpoint = self._checkpoint()
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents-envs\mlagents_envs\timers.py", line 305, in wrapped
return func(*args, **kwargs)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\trainer\rl_trainer.py", line 189, in checkpoint
checkpoint_path = self.model_saver.save_checkpoint(self.brain_name, self.step)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\model_saver\torch_model_saver.py", line 57, in save_checkpoint
self.export(checkpoint_path, behavior_name)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\model_saver\torch_model_saver.py", line 62, in export
self.exporter.export_policy_model(output_filepath)
File "c:\ml-agents-release_12\ml-agents-release_12\ml-agents\mlagents\trainers\torch\model_serialization.py", line 107, in export_policy_model
torch.onnx.export(
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\onnx_init
.py", line 225, in export
return utils.export(model, args, f, export_params, verbose, training,
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\onnx\utils.py", line 85, in export
_export(model, args, f, export_params, verbose, training, input_names, output_names,
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\onnx\utils.py", line 632, in _export
_model_to_graph(model, args, verbose, input_names,
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\onnx\utils.py", line 409, in _model_to_graph
graph, params, torch_out = _create_jit_graph(model, args,
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\onnx\utils.py", line 379, in _create_jit_graph
graph, torch_out = _trace_and_get_graph_from_model(model, args)
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\onnx\utils.py", line 342, in _trace_and_get_graph_from_model
torch.jit._get_trace_graph(model, args, strict=False, _force_outplace=False, _return_inputs_states=True)
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\jit_trace.py", line 1148, in _get_trace_graph
outs = ONNXTracedModule(f, strict, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\jit_trace.py", line 125, in forward
graph, out = torch._C._create_graph_by_tracing(
File "C:\Users\user\Anaconda3\envs\yukkuri\lib\site-packages\torch\jit_trace.py", line 119, in wrapper
out_vars, _ = _flatten(outs)
RuntimeError: Only tuples, lists and Variables supported as JIT inputs/outputs. Dictionaries and strings are also accepted but their usage is not recommended. But got unsupported type NoneType

環境はanaconda python3.8.2、unity 2019.4.16f1 です。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.35%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問