Skip to content

Fix bug: sample_eps maybe None #32

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 6 additions & 4 deletions transport/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ def create_transport(
path_type = path_choice[path_type]

if (path_type in [PathType.VP]):
train_eps = 1e-5 if train_eps is None else train_eps
sample_eps = 1e-3 if train_eps is None else sample_eps
train_eps_new = 1e-5 if train_eps is None else train_eps
sample_eps_new = 1e-3 if train_eps is None else sample_eps
train_eps, sample_eps = train_eps_new, sample_eps_new
elif (path_type in [PathType.GVP, PathType.LINEAR] and model_type != ModelType.VELOCITY):
train_eps = 1e-3 if train_eps is None else train_eps
sample_eps = 1e-3 if train_eps is None else sample_eps
train_eps_new = 1e-3 if train_eps is None else train_eps
sample_eps_new = 1e-3 if train_eps is None else sample_eps
train_eps, sample_eps = train_eps_new, sample_eps_new
else: # velocity & [GVP, LINEAR] is stable everywhere
train_eps = 0
sample_eps = 0
Expand Down