This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cargo build --target thumbv7em-none-eabihf | |
Compiling vcell v0.1.0 | |
Compiling bare-metal v0.2.3 | |
Compiling aligned v0.2.0 | |
Compiling r0 v0.2.2 | |
Compiling void v1.0.2 | |
Compiling nb v0.1.1 | |
Compiling cast v0.2.2 | |
Compiling panic-abort v0.2.0 | |
Compiling typenum v1.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
class ReplayBuffer: | |
def __init__(self, max_size=10_000, device='cpu'): | |
self.size = max_size | |
self.n_stored = 0 | |
self.next_idx = 0 | |
self.device = device |