MCPcopy Create free account
hub / github.com/deepdrive/deepdrive / ensure_baseline_weights

Function ensure_baseline_weights

tensorflow_agent/agent.py:365–373  ·  view source on GitHub ↗
(net_path)

Source from the content-addressed store, hash-verified

363
364
365def ensure_baseline_weights(net_path):
366 if net_path is not None:
367 raise ValueError('Net path should not be set when running the baseline agent as it has its own weights.')
368 net_path = os.path.join(c.BASELINE_WEIGHTS_DIR, c.BASELINE_WEIGHTS_VERSION)
369 if not glob.glob(net_path + '*'):
370 print('\n--------- Baseline weights not found, downloading ----------')
371 download(c.BASELINE_WEIGHTS_URL + '?cache_bust=' + c.BASELINE_WEIGHTS_VERSION, c.WEIGHTS_DIR,
372 warn_existing=False, overwrite=True)
373 return net_path

Callers 1

runFunction · 0.85

Calls 1

downloadFunction · 0.90

Tested by

no test coverage detected