Open lk1983823 opened 2 years ago
Hi @lk1983823, I have faced with ur bug and I think what happens in here is that the shape of the state is not in the right way. State must has its shape like [batch_size, num_feats]. So I change a little bit in the file offlinerl/evaluation/neorl.py, from action = policy.get_action(state).reshape(-1, act_dim)
to if len(state.shape) == 1: state = state.reshape(-1, state.shape[0]) action = policy.get_action(state).reshape(-1, act_dim) if len(action.shape) == 1: action = action.reshape(-1, action.shape[0])
Hope it can help.
When I run the command python examples/train_task.py --algo_name=mopo --exp_name=halfcheetah --task HalfCheetah-v3 --task_data_type low --task_train_num 2 It shows :
Other algos also show the same error. Thanks for solving this problem!