本文整理匯總了Python中baselines.common.schedules.LinearSchedule方法的典型用法代碼示例。如果您正苦於以下問題:Python schedules.LinearSchedule方法的具體用法?Python schedules.LinearSchedule怎麽用?Python schedules.LinearSchedule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類baselines.common.schedules
的用法示例。
在下文中一共展示了schedules.LinearSchedule方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from baselines.common import schedules [as 別名]
# 或者: from baselines.common.schedules import LinearSchedule [as 別名]
def __init__(self, size, alpha, epsilon, timesteps, initial_p, final_p):
super(DoublePrioritizedReplayBuffer, self).__init__(size)
assert alpha > 0
self._alpha = alpha
self._epsilon = epsilon
self._beta_schedule = LinearSchedule(timesteps, initial_p=initial_p, final_p=final_p)
it_capacity = 1
while it_capacity < size:
it_capacity *= 2
self._it_sum = SumSegmentTree(it_capacity)
self._it_min = MinSegmentTree(it_capacity)
self._max_priority = 1.0
self._it_sum2 = SumSegmentTree(it_capacity)
self._it_min2 = MinSegmentTree(it_capacity)
self._max_priority2 = 1.0