Skip to content

API reference ​

INFO

Esta página aún no está traducida. Leer en inglés

Generated from the docstrings of torch_world.

modulecontents
torch_world.nnready encoders CLSEncoder, PixelPatches, PatchTokens (DINOv2) and VideoTokens (V-JEPA 2), TextEncoder and WordTokenizer; VisionTransformer (image and video), MaskedPredictor, Transformer, Block, AdaLNBlock, Attention, MLP, sin-cos and rotary positions
torch_world.masksMultiBlockMask (2D), MultiBlock3DMask (video), frame_causal_mask, apply_masks
torch_world.lossesSIGReg, RDMReg, info_nce
torch_world.modelsthe JEPA and WorldModel base classes and the models
torch_world.planningCEM, for any WorldModel, scoring the final or every imagined step; MPPI, for reward (TD-MPC2) or a goal; GRASP, by gradient descent; HierarchicalPlanner and GradientPlanner for two-level models
torch_world.safetylatent safety filters: a failure margin learned on latents, a reachability value function learned in imagination, and a filter that overrides a task policy only when it would become unsafe
torch_world.envsRobotCube (reach or pick-and-place) and PushT (MuJoCo), the pixel worlds Macaw, PointMass and TwoRooms; run_policy
torch_world.datasetsTrajectoryDataset, MedMNIST, MedicalVQA
torch_world.evaluationprotocols that run a model and score it: goal_reaching for planners (success rates, videos) and goal_policy to plan toward goal images, vqa and compare for question answering
torch_world.metricsthe metrics of the papers, on plain tensors: linear, k-NN and attentive probes; RankMe and LiDAR; rollout error, SSIM, PSNR and Chamfer distance; recall@k and top-k accuracy; for robotics, success rates with confidence intervals, steps to success, progress, SPL and smoothness
torch_world.utilsfit, a training loop; ema_update, linear_schedule, recompute_batchnorm
torch_world.plotsmatplotlib figures for notebooks (optional dependency)
torch_world.hubsave_pretrained, from_pretrained, push_to_hub and model_card: checkpoints as safetensors with a config that rebuilds the model (optional dependency)