def _candidate_variable(self, obs):
    candidate_leng = [(len(ob['candidate']) + 1) for ob in obs]
    candidate_feat = np.zeros((len(obs), max(candidate_leng), (self.feature_size + args.angle_feat_size)), dtype=np.float32)
    for (i, ob) in enumerate(obs):
        for (j, c) in enumerate(ob['candidate']):
            candidate_feat[i, j, :] = c['feature']
    return (torch.from_numpy(candidate_feat).cuda(), candidate_leng)
def _candidate_variable(self, obs):
    candidate_leng = [(len(ob['candidate']) + 1) for ob in obs]
    candidate_feat = np.zeros((len(obs), max(candidate_leng), (self.feature_size + args.angle_feat_size)), dtype=np.float32)
    for (i, ob) in enumerate(obs):
        for (j, c) in enumerate(ob['candidate']):
            candidate_feat[i, j, :] = c['feature']
    return (torch.from_numpy(candidate_feat).cuda(), candidate_leng)