MCPcopy Create free account
hub / github.com/XL2248/MSCTD / export_params

Function export_params

src_code/thumt1_code/thumt/bin/trainer.py:137–144  ·  view source on GitHub ↗
(output_dir, name, params)

Source from the content-addressed store, hash-verified

135
136
137def export_params(output_dir, name, params):
138 if not tf.gfile.Exists(output_dir):
139 tf.gfile.MkDir(output_dir)
140
141 # Save params as params.json
142 filename = os.path.join(output_dir, name)
143 with tf.gfile.Open(filename, "w") as fd:
144 fd.write(params.to_json())
145
146
147def collect_params(all_params, params):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected