Making science, Making science

This commit is contained in:
Dominik Moritz Roth 2023-05-04 19:29:54 +02:00
parent e0471dbfb7
commit 539f586751

10
test.py
View File

@ -133,7 +133,7 @@ class Perlin_Noise():
class Perlin_PCA_Noise():
def __init__(self, dim_a=2, kernel_func='SE_1.41_1.0', window=128, ssf=-1, f_sigma=1):
def __init__(self, dim_a=2, kernel_func='SE_1.414_1.0', window=32, ssf=-1, f_sigma=1):
self.dim_a = dim_a
self.kernel_func = kernel_func
self.window = window
@ -162,7 +162,7 @@ class Perlin_PCA_Noise():
class PCA_Noise():
def __init__(self, dim_a=2, kernel_func='SE_1.41_1.0', window=128, ssf=-1, f_sigma=1):
def __init__(self, dim_a=2, kernel_func='SE_1.414_1.0', window=32, ssf=-1, f_sigma=1):
self.dim_a = dim_a
self.kernel_func = kernel_func
self.window = window
@ -188,7 +188,7 @@ class PCA_Noise():
class Human_PCA_Noise():
def __init__(self, dim_a=2, kernel_func='SE_1.414_1.0', window=128, ssf=-1, f_sigma=1):
def __init__(self, dim_a=2, kernel_func='SE_1.414_1.0', window=32, ssf=-1, f_sigma=1):
self.dim_a = dim_a
self.kernel_func = kernel_func
self.window = window
@ -203,7 +203,7 @@ class Human_PCA_Noise():
traj = th.Tensor(self.traj).unsqueeze(0)
eps = human_input(obs, env)
epsilon = th.Tensor(eps).unsqueeze(0)
sample = self.dist.sample(traj, self.f_sigma, epsilon).squeeze(0)
sample = self.dist.sample(traj, self.f_sigma, epsilon=epsilon).squeeze(0)
self.traj.append(sample)
self.index += 1
return sample
@ -217,7 +217,7 @@ class Human_PCA_Noise():
class Colored_PCA_Noise():
def __init__(self, beta=1, dim_a=2, samples=2**18, kernel_func='SE_1.41_1', window=64, ssf=-1):
def __init__(self, beta=1, dim_a=2, samples=2**18, kernel_func='SE_1.41_1.0', window=32, ssf=-1):
self.beta = beta
self.dim_a = dim_a
self.samples = samples