MCPcopy Create free account
hub / github.com/commaai/research / cleanup

Function cleanup

models/conditional.py:28–37  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

26
27
28def 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
40def transition(batch_size, dim=1000):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected