Skip to content

Commit

Permalink
sample.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ZongjingLi committed Nov 8, 2023
1 parent b294f96 commit f541e4c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autolearner/model/knowledge/addpostion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import torch
import torch.nn as nn
4 changes: 4 additions & 0 deletions autolearner/model/reason/reasoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions autolearner/model/reason/sampler.py
Original file line number Diff line number Diff line change
@@ -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__()

0 comments on commit f541e4c

Please sign in to comment.