(param, weight_storage, grad_storage, storage_offset)
| 24 | flatten_grads_storage = flatten_grads_tensor.storage() |
| 25 | |
| 26 | def set_storage(param, weight_storage, grad_storage, storage_offset): |
| 27 | with torch.no_grad(): |
| 28 | z = torch.zeros_like(param.data) |
| 29 | z.set_(weight_storage, storage_offset, param.shape) |
| 30 | param.data = z |
| 31 | |
| 32 | t = torch.zeros_like(param.data) |
| 33 | t.set_(grad_storage, storage_offset, param.shape) |
| 34 | param.grad = t |
| 35 | |
| 36 | offset = 0 |
| 37 | for i in range(len(params)): |
no outgoing calls
no test coverage detected