(step)
| 19 | log_path = 'train_log' |
| 20 | |
| 21 | def get_learning_rate(step): |
| 22 | if step < 2000: |
| 23 | mul = step / 2000. |
| 24 | return 3e-4 * mul |
| 25 | else: |
| 26 | mul = np.cos((step - 2000) / (args.epoch * args.step_per_epoch - 2000.) * math.pi) * 0.5 + 0.5 |
| 27 | return (3e-4 - 3e-6) * mul + 3e-6 |
| 28 | |
| 29 | def flow2rgb(flow_map_np): |
| 30 | h, w, _ = flow_map_np.shape |