Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug fixes #12

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def forward(self, x):

def to(self, device: str):
self.model.to(device)
super().to(device)
return super().to(device)


class ParameterModule(BaseModule, ABC):
Expand Down
6 changes: 4 additions & 2 deletions decoupled_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
from gpytorch.priors import Prior, NormalPrior, GammaPrior
from gpytorch.constraints import Interval, Positive

from base import ParameterModule

try:
from base import ParameterModule
except (ImportError, ModuleNotFoundError):
from .base import ParameterModule

class InputOffset(ParameterModule):
"""Adds input offset calibration to the model.
Expand Down
5 changes: 4 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from torch import Tensor
from botorch.models.transforms.input import AffineInputTransform

from base import BaseModule
try:
from base import BaseModule
except (ImportError, ModuleNotFoundError):
from .base import BaseModule


def extract_input_transformer(module: BaseModule) -> AffineInputTransform:
Expand Down
Loading