87da37f856f55931eaa6e58e01c34931ad088599,rlkit/torch/pytorch_util.py,,ones,#,86
Before Change
def ones(*sizes, **kwargs):
return torch.ones(*sizes, **kwargs).to(device)
def randn(*args, **kwargs):
return torch.randn(*args, **kwargs).to(device)
After Change
def ones(*sizes, torch_device=None, **kwargs):
if torch_device is None:
torch_device = device
return torch.ones(*sizes, **kwargs, device=torch_device)
def ones_like(*args, torch_device=None, **kwargs):
In pattern: SUPERPATTERN
Frequency: 5
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: 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: zeros_like
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: c1e9ec6b6aa6b9cd1c3139f118eed0201dea9fd2
Time: 2019-04-04
Author: vitchyr@gmail.com
File Name: rlkit/torch/pytorch_util.py
Class Name:
Method Name: FloatTensor
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