MCPcopy Create free account
hub / github.com/SLDGroup/EMCAD / worker_init_fn

Function worker_init_fn

trainer.py:55–56  ·  view source on GitHub ↗
(worker_id)

Source from the content-addressed store, hash-verified

53 print("The length of train set is: {}".format(len(db_train)))
54
55 def worker_init_fn(worker_id):
56 random.seed(args.seed + worker_id)
57
58 trainloader = DataLoader(db_train, batch_size=batch_size, shuffle=True, num_workers=8, pin_memory=True,
59 worker_init_fn=worker_init_fn)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected