MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / _get_device_option

Function _get_device_option

detectron2/export/shared.py:351–355  ·  view source on GitHub ↗
(producer_op)

Source from the content-addressed store, hash-verified

349 # NOTE: this assumes that the params is determined by producer op with the
350 # only exception be CopyGPUToCPU which is CUDA op but returns CPU tensor.
351 def _get_device_option(producer_op):
352 if producer_op.type == "CopyGPUToCPU":
353 return caffe2_pb2.DeviceOption()
354 else:
355 return producer_op.device_option
356
357 with ScopedWS("__get_params_from_init_net__", is_reset=True, is_cleanup=True) as ws:
358 ws.RunNetOnce(init_net)

Callers 1

get_params_from_init_netFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected