(model, data, ofs)
| 141 | |
| 142 | |
| 143 | def _debug(model, data, ofs): |
| 144 | for i, item in enumerate(tqdm.tqdm(data)): |
| 145 | (_, history), = model.compute_loss([item], debug=True) |
| 146 | ofs.write( |
| 147 | json.dumps({ |
| 148 | 'index': i, |
| 149 | 'history': history, |
| 150 | }) + '\n') |
| 151 | ofs.flush() |
| 152 | |
| 153 | |
| 154 | if __name__ == "__main__": |
no test coverage detected