Skip to content
Snippets Groups Projects
Commit d40e3e10 authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Readded tranpose

parent cfe1b2c7
No related branches found
No related tags found
2 merge requests!110V1.2.0 changes,!104Resolve "Faster Drawing"
Pipeline #58987 failed
......@@ -47,10 +47,9 @@ def run_benchmark(GRID_SIZE, ITERS, OPTIMIZATIONS):
time_start = time.perf_counter()
observation = visualizer.get_state_image(state=json_dict, cache_flags=OPTIMIZATIONS["cache_counters"])
# img = cv2.resize(img, (400, 400), interpolation=cv2.INTER_NEAREST)
# cv2.imshow("env", img[:, :, ::-1])
# cv2.waitKey(1)
img = cv2.resize(observation.transpose((1, 0, 2)), (400, 400), interpolation=cv2.INTER_NEAREST)
cv2.imshow("env", img[:, :, ::-1])
cv2.waitKey(1)
durations.append(time.perf_counter() - time_start)
print(f"Mean duration: %.6fs" % np.mean(durations))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment