87da37f856f55931eaa6e58e01c34931ad088599,rlkit/torch/pytorch_util.py,,zeros,#,82
Before Change
def zeros(*sizes, **kwargs):
return torch.zeros(*sizes, **kwargs).to(device)
def ones(*sizes, **kwargs):
return torch.ones(*sizes, **kwargs).to(device)
After Change
def zeros(*sizes, torch_device=None, **kwargs):
if torch_device is None:
torch_device = device
return torch.zeros(*sizes, **kwargs, device=torch_device)
def zeros_like(*args, torch_device=None, **kwargs):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances
Project Name: vitchyr/rlkit
Commit Name: 87da37f856f55931eaa6e58e01c34931ad088599
Time: 2019-01-12
Author: vitchyr@gmail.com
File Name: rlkit/torch/pytorch_util.py
Class Name:
Method Name: zeros
Project Name: vitchyr/rlkit
Commit Name: 87da37f856f55931eaa6e58e01c34931ad088599
Time: 2019-01-12
Author: vitchyr@gmail.com
File Name: rlkit/torch/pytorch_util.py
Class Name:
Method Name: ones
Project Name: vitchyr/rlkit
Commit Name: 87da37f856f55931eaa6e58e01c34931ad088599
Time: 2019-01-12
Author: vitchyr@gmail.com
File Name: rlkit/torch/pytorch_util.py
Class Name:
Method Name: randn
Project Name: vitchyr/rlkit
Commit Name: 87da37f856f55931eaa6e58e01c34931ad088599
Time: 2019-01-12
Author: vitchyr@gmail.com
File Name: rlkit/torch/pytorch_util.py
Class Name:
Method Name: zeros_like