rhoowd / sched_net

83 stars 29 forks source link

error when run main.py #4

Open white-bubbleee opened 3 months ago

white-bubbleee commented 3 months ago

Hi, I ran the code main.py and got the following error:

Original stack trace for 'slow_target_schedule/dense/MatMul': File "main.py", line 36, in trainer = agents.load(FLAGS.agent+"/trainer.py").Trainer(env) File "E:\github-packages\2024-06\sched_net\agents\schednet/trainer.py", line 41, in init obs_dim=self._obs_dim) File "E:\github-packages\2024-06\sched_net\agents\schednet\agent.py", line 44, in init self.weight_generator = WeightGeneratorNetwork(self.sess, self._n_agent, self._obs_dim) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 36, in init self.target_schedule_policy = tf.stop_gradient(self.generate_wg(self.obs_ph, trainable=False)) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 62, in generate_wg s = self.generate_wg_network(obs_list[i], trainable) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 73, in generate_wg_network use_bias=True, trainable=trainable) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324, in new_func return func(*args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\layers\core.py", line 187, in dense return layer.apply(inputs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324, in new_func return func(*args, *kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 1700, in apply return self.call(inputs, args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\layers\base.py", line 548, in call outputs = super(Layer, self).call(inputs, *args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 854, in call outputs = call_fn(cast_inputs, *args, *kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 234, in wrapper return converted_call(f, options, args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 439, in converted_call return _call_unconverted(f, args, kwargs, options) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 330, in _call_unconverted return f(args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\keras\layers\core.py", line 1050, in call outputs = gen_math_ops.mat_mul(inputs, self.kernel) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\ops\gen_math_ops.py", line 6136, in mat_mul name=name) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 794, in _apply_op_helper op_def=op_def) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 507, in new_func return func(*args, **kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3357, in create_op attrs, op_def, compute_device) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3426, in _create_op_internal op_def=op_def) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1748, in init self._traceback = tf_stack.extract_stack()

I'm looking forward to your help! thank u!

white-bubbleee commented 3 months ago

Traceback (most recent call last): File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call return fn(*args) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 1350, in _run_fn target_list, run_metadata) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found. (0) Internal: Blas GEMM launch failed : a.shape=(64, 28), b.shape=(28, 32), m=64, n=32, k=28 [[{{node slow_target_schedule/dense/MatMul}}]] [[slow_target_schedule/StopGradient/_13]] (1) Internal: Blas GEMM launch failed : a.shape=(64, 28), b.shape=(28, 32), m=64, n=32, k=28 [[{{node slow_target_schedule/dense/MatMul}}]] 0 successful operations. 0 derived errors ignored.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 42, in trainer.learn() File "E:\github-packages\2024-06\sched_net\agents\schednet/trainer.py", line 84, in learn self.train_agents(state, obs_n, action_n, reward_n, state_next, obs_n_next, schedule_n, priority, done_single) File "E:\github-packages\2024-06\sched_net\agents\schednet/trainer.py", line 149, in train_agents state_next, predator_obs_next, schedule_n, priority, done) File "E:\github-packages\2024-06\sched_net\agents\schednet\agent.py", line 89, in train self.update_ac() File "E:\github-packages\2024-06\sched_net\agents\schednet\agent.py", line 107, in updateac p = self.weight_generator.target_schedule_forobs(o) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 92, in target_schedule_for_obs feed_dict={self.obs_ph: obs_ph, self.is_training_ph: False}) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run run_metadata_ptr) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 1180, in _run feed_dict_tensor, options, run_metadata) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 1359, in _do_run run_metadata) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\client\session.py", line 1384, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found. (0) Internal: Blas GEMM launch failed : a.shape=(64, 28), b.shape=(28, 32), m=64, n=32, k=28 [[node slow_target_schedule/dense/MatMul (defined at E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]] [[slow_target_schedule/StopGradient/_13]] (1) Internal: Blas GEMM launch failed : a.shape=(64, 28), b.shape=(28, 32), m=64, n=32, k=28 [[node slow_target_schedule/dense/MatMul (defined at E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]] 0 successful operations. 0 derived errors ignored.

Original stack trace for 'slow_target_schedule/dense/MatMul': File "main.py", line 36, in trainer = agents.load(FLAGS.agent+"/trainer.py").Trainer(env) File "E:\github-packages\2024-06\sched_net\agents\schednet/trainer.py", line 41, in init obs_dim=self._obs_dim) File "E:\github-packages\2024-06\sched_net\agents\schednet\agent.py", line 44, in init self.weight_generator = WeightGeneratorNetwork(self.sess, self._n_agent, self._obs_dim) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 36, in init self.target_schedule_policy = tf.stop_gradient(self.generate_wg(self.obs_ph, trainable=False)) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 62, in generate_wg s = self.generate_wg_network(obs_list[i], trainable) File "E:\github-packages\2024-06\sched_net\agents\schednet\sched_network.py", line 73, in generate_wg_network use_bias=True, trainable=trainable) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324, in new_func return func(*args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\layers\core.py", line 187, in dense return layer.apply(inputs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324, in new_func return func(*args, *kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 1700, in apply return self.call(inputs, args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\layers\base.py", line 548, in call outputs = super(Layer, self).call(inputs, *args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 854, in call outputs = call_fn(cast_inputs, *args, *kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 234, in wrapper return converted_call(f, options, args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 439, in converted_call return _call_unconverted(f, args, kwargs, options) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 330, in _call_unconverted return f(args, kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\keras\layers\core.py", line 1050, in call outputs = gen_math_ops.mat_mul(inputs, self.kernel) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\ops\gen_math_ops.py", line 6136, in mat_mul name=name) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 794, in _apply_op_helper op_def=op_def) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 507, in new_func return func(*args, **kwargs) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3357, in create_op attrs, op_def, compute_device) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3426, in _create_op_internal op_def=op_def) File "E:\My_Envs\imac_tf\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1748, in init self._traceback = tf_stack.extract_stack()