MCPcopy Create free account
hub / github.com/Yonv1943/Python / sample_batch

Method sample_batch

ElegantRL/replay.py:86–115  ·  view source on GitHub ↗

randomly sample a batch of data for training :int batch_size: the number of data in a batch for Stochastic Gradient Descent :return torch.Tensor reward: reward.shape==(now_len, 1) :return torch.Tensor mask: mask.shape ==(now_len, 1), mask = 0.0 if done else gamma

(self, batch_size)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 11

get_obj_critic_rawMethod · 0.45
get_obj_critic_perMethod · 0.45
get_obj_critic_rawMethod · 0.45
get_obj_critic_perMethod · 0.45
get_obj_critic_rawMethod · 0.45
get_obj_critic_perMethod · 0.45
get_obj_critic_rawMethod · 0.45
get_obj_critic_perMethod · 0.45
get_obj_critic_rawMethod · 0.45
get_obj_critic_perMethod · 0.45
sample_batchMethod · 0.45

Calls 1

Tested by

no test coverage detected