(model)
| 2037 | |
| 2038 | |
| 2039 | def _get_param_to_device(model): |
| 2040 | # Infer blob devices by going through the net and param_init_net |
| 2041 | # ops and observing the device used to create or use the blob. |
| 2042 | param_to_device = core.InferBlobDevices(model.net) |
| 2043 | param_to_device.update(core.InferBlobDevices(model.param_init_net)) |
| 2044 | return param_to_device |
| 2045 | |
| 2046 | |
| 2047 | def get_param_device(param_name, grad, param_to_device=None, default_device=None): |