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

[UPDATE] reproduce code successfully #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tqdm import tqdm
from copy import deepcopy
from tensorboardX import SummaryWriter
from torch.utils.tensorboard import SummaryWriter
from torch.nn.init import xavier_uniform_

from src.utils import config
Expand Down
2 changes: 1 addition & 1 deletion src/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def _gen_timing_signal(length, channels, min_timescale=1.0, max_timescale=1.0e4)
float(num_timescales) - 1
)
inv_timescales = min_timescale * np.exp(
np.arange(num_timescales).astype(np.float) * -log_timescale_increment
np.arange(num_timescales).astype(float) * -log_timescale_increment
)
scaled_time = np.expand_dims(position, 1) * np.expand_dims(inv_timescales, 0)

Expand Down