MCPcopy Index your code
hub / github.com/pytorch/pytorch / run

Method run

caffe2/python/hypothesis_test.py:293–303  ·  view source on GitHub ↗
(do)

Source from the content-addressed store, hash-verified

291 do.random_seed = 1000
292
293 def run(do):
294 # Reset each time because 'Y' may already exist in the workspace
295 # on a different device
296 workspace.ResetWorkspace()
297 ws = workspace.C.Workspace()
298 op = core.CreateOperator(
299 "XavierFill", [], ["Y"],
300 device_option=do,
301 shape=[2])
302 ws.run(op)
303 return ws.blobs["Y"].fetch()
304
305 ys = [run(do) for do in device_options]
306 for y in ys[1:]:

Callers 15

test_printMethod · 0.45
enqueueMethod · 0.45
test_safe_blobs_queueMethod · 0.45
test_tt_layerMethod · 0.45
test_tt_sls_layerMethod · 0.45
test_tt_sls_reproMethod · 0.45

Calls 6

astypeMethod · 0.80
rangeFunction · 0.50
fetchMethod · 0.45
seedMethod · 0.45
formatMethod · 0.45
randnMethod · 0.45

Tested by

no test coverage detected