{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "344ea703", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "env: JAX_PLATFORMS=cpu\n", "env: XLA_PYTHON_CLIENT_PREALLOCATE=false\n" ] } ], "source": [ "%env JAX_PLATFORMS=cpu\n", "%env XLA_PYTHON_CLIENT_PREALLOCATE=false" ] }, { "cell_type": "code", "execution_count": 2, "id": "e64f01b0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from robotodo.controllers.pi0 import Pi0Controller\n", "\n", "controller = Pi0Controller.from_checkpoint(\"pi0_aloha_sim\")\n", "controller" ] }, { "cell_type": "code", "execution_count": 3, "id": "bbbf804f", "metadata": {}, "outputs": [], "source": [ "observation = controller.observation_spec.reshape({\n", " # \"batch?\": 10,\n", " \"height\": 32,\n", " \"width\": 32,\n", " \"channels\": 3,\n", "}).random()" ] }, { "cell_type": "code", "execution_count": 4, "id": "da800035", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'text': array(['0.856666668099545'], dtype='