Planning code bug
ligengen opened this issue · comments
When I use command python3 main.py -learn_var -seed 1 -loadpath ./out/continuous-gtype-1-rn-2-cc-7-infow-0.10-transw-0.10-astar_plan-fcn-var -loadepoch 100 -n_epochs 1 -planning_epoch 1
, the solver_class is SolverNoPruning and the function called neighbors in this class seems be buggy. Since observation in state, observation = node.unpack()
is a tensor in the first two node but then numpy array in the rest of them.
If it is a tensor, then we need change observation to observation.cpu() in observations = np.tile(observation, (self.mc_samples, 1))
. So I changed to if type(observation).__module__ == 'torch': observation = observation.cpu()
BUT this ends up as an endless loop...
I also tried to use the solver_class called Solver. But it can not find any possible path.
Besides, what is the function of mc_samples
? Should it be set as the same value as the total epoch number?
Could you please help me out? Thanks so much! I am using TF1.14.0, and the rest of packages are the same as your yml file.