Closed viking-sudo-rm closed 4 years ago
Should be able to do this in a way that doesn't break old API. In other words, we define
@classmethod
def empty(cls, batch_size, stack_dim, device):
stack = cls(stack_dim)
stack.reset(batch_size, device)
return stack
Fixed in 95446f2.
Should change API from classmethod
empty()
and methodupdate()
to two methodsreset()
andupdate()
.This would make
get_num_actions()
a property of an instance, not a class. This makes it easier to change the number of actions for multipush/multipop stacks.