File size: 870 Bytes
471c82f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # 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)
|