model_hypothesis.py 文件源码

python
阅读 41 收藏 0 点赞 0 评论 0

项目:uai2017_learning_to_acquire_information 作者: evanthebouncy 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号