MCPcopy Create free account
hub / github.com/BVLC/caffe / train

Function train

python/train.py:10–30  ·  view source on GitHub ↗
(
        solver,  # solver proto definition
        snapshot,  # solver snapshot to restore
        gpus,  # list of device ids
        timing=False,  # show timing info for compute and communications
)

Source from the content-addressed store, hash-verified

8
9
10def train(
11 solver, # solver proto definition
12 snapshot, # solver snapshot to restore
13 gpus, # list of device ids
14 timing=False, # show timing info for compute and communications
15):
16 # NCCL uses a uid to identify a session
17 uid = caffe.NCCL.new_uid()
18
19 caffe.init_log()
20 caffe.log('Using devices %s' % str(gpus))
21
22 procs = []
23 for rank in range(len(gpus)):
24 p = Process(target=solve,
25 args=(solver, snapshot, gpus, timing, uid, rank))
26 p.daemon = True
27 p.start()
28 procs.append(p)
29 for p in procs:
30 p.join()
31
32
33def time(solver, nccl):

Callers 1

train.pyFile · 0.70

Calls 2

new_uidMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected