(output_dir, name, params)
| 135 | |
| 136 | |
| 137 | def 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 | |
| 147 | def collect_params(all_params, params): |