def get_feed_dic_obs(self, obs):
# needing to create all the nessisary feeds
obs_x = []
obs_y = []
obs_tf = []
for _ in range(OBS_SIZE):
obs_x.append(np.zeros([N_BATCH,L]))
obs_y.append(np.zeros([N_BATCH,L]))
obs_tf.append(np.zeros([N_BATCH,2]))
num_obs = len(obs)
for ob_idx in range(num_obs):
ob_coord, ob_lab = obs[ob_idx]
ob_x, ob_y = vectorize(ob_coord)
obs_x[ob_idx] = np.tile(ob_x, [50,1])
obs_y[ob_idx] = np.tile(ob_y, [50,1])
obs_tf[ob_idx] = np.tile(ob_lab, [50,1])
feed_dic = dict(zip(self.ph_obs_x + self.ph_obs_y + self.ph_obs_tf,
obs_x + obs_y + obs_tf))
return feed_dic
model_hypothesis.py 文件源码
python
阅读 41
收藏 0
点赞 0
评论 0
评论列表
文章目录