GR00T-VisualSim2Real / data /gr00t /rl /agents /modules /encoder_modules.py
introvoyz041's picture
Migrated from GitHub
471c82f verified
Raw
History Blame Contribute Delete
870 Bytes
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import torch.nn as nn
from .modules import BaseModule
class Estimator(nn.Module):
def __init__(self, obs_dim_dict, module_config_dict):
super(Estimator, self).__init__()
self.module = BaseModule(obs_dim_dict, module_config_dict)
# def estimate(self, obs_history):
# return self.module(obs_history)
def forward(self, obs_history):
return self.module(obs_history)
class Encoder(nn.Module):
def __init__(self, obs_dim_dict, module_config_dict, module_dim_dict={}):
super(Encoder, self).__init__()
self.module = BaseModule(obs_dim_dict, module_config_dict, module_dim_dict)
def forward(self, encoder_obs):
return self.module(encoder_obs)