From f541e4c66a26d89feb22cb3d646d4b93bf40364a Mon Sep 17 00:00:00 2001 From: Melkor <115195620+ZongjingLi@users.noreply.github.com> Date: Wed, 8 Nov 2023 08:48:57 +0800 Subject: [PATCH] sample.py --- autolearner/model/knowledge/addpostion.py | 2 ++ autolearner/model/reason/reasoner.py | 4 ++++ autolearner/model/reason/sampler.py | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 autolearner/model/knowledge/addpostion.py create mode 100644 autolearner/model/reason/sampler.py diff --git a/autolearner/model/knowledge/addpostion.py b/autolearner/model/knowledge/addpostion.py new file mode 100644 index 0000000..6b34093 --- /dev/null +++ b/autolearner/model/knowledge/addpostion.py @@ -0,0 +1,2 @@ +import torch +import torch.nn as nn \ No newline at end of file diff --git a/autolearner/model/reason/reasoner.py b/autolearner/model/reason/reasoner.py index e4cf465..a267362 100644 --- a/autolearner/model/reason/reasoner.py +++ b/autolearner/model/reason/reasoner.py @@ -195,6 +195,10 @@ def forward_reason(self, x): return x class UniversalMap(nn.Module): + """ + The Univseral Neuro Map that is takes several input channels [d] and output channel [o] as config + to create the whole mapping. + """ def __init__(self, name, input_dims, output_dim, fc_dim = 64, conv_dim = 64): super().__init__() self.name = name diff --git a/autolearner/model/reason/sampler.py b/autolearner/model/reason/sampler.py new file mode 100644 index 0000000..2c30697 --- /dev/null +++ b/autolearner/model/reason/sampler.py @@ -0,0 +1,11 @@ +import torch +import torch.nn as nn +import torch.nn.functional as F + +class TrajectoryDiffuser(nn.Module): + """ + An action diffusion model that is used to perform diffusion and sample valid trajectory + for a specific action. + """ + def __init__(self, action_dim, latent_dim, beta = 0.1): + super().__init__() \ No newline at end of file