Callbacks for buffer
Buffer
The Buffer
class holds samples generated during the BuildBuffer
event. Samples added to the buffer can be any python object that is hashable.
Sample hashing is used to determine unique samples. For this reason, samples should avoid using containers like pytorch Tensors which are hashed on the tensor object level rather than the numeric level.
set([torch.tensor(0.), torch.tensor(0.)])
>> {tensor(0.), tensor(0.)}
set([0., 0.])
>> {0.0}