(data)
| 26 | |
| 27 | |
| 28 | def cleanup(data): |
| 29 | X = data[0] |
| 30 | angle, speed = data[1], data[2] |
| 31 | sh = X.shape |
| 32 | X = X.reshape((-1, 3, 160, 320)) |
| 33 | X = np.asarray([cv2.resize(x.transpose(1, 2, 0), (160, 80)) for x in X]) |
| 34 | X = X/127.5 - 1. |
| 35 | X = X.reshape((sh[0], 4*(time+out_leng), 80, 160, 3)) |
| 36 | Z = np.concatenate([angle, speed], axis=-1) |
| 37 | return Z[:, ::4], X[:, ::4] |
| 38 | |
| 39 | |
| 40 | def transition(batch_size, dim=1000): |
nothing calls this directly
no outgoing calls
no test coverage detected