Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

Commit 3bbd5be

Browse files
author
Omegastick
committed
Fix uninitialized member in RolloutStorage
1 parent bd69f20 commit 3bbd5be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/storage.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ RolloutStorage::RolloutStorage(int64_t num_steps,
5050

5151
RolloutStorage::RolloutStorage(std::vector<RolloutStorage *> individual_storages,
5252
torch::Device device)
53-
: device(device), step(0)
53+
: device(device),
54+
num_steps(individual_storages[0]->get_rewards().size(0)),
55+
step(0)
5456
{
5557
std::vector<torch::Tensor> observations_vec;
5658
std::transform(individual_storages.begin(), individual_storages.end(),

0 commit comments

Comments
 (0)