Skip to content

Commit

Permalink
fix the gradient backward issue when joint training with s3prl frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
simpleoier committed May 5, 2023
1 parent 33aa097 commit 5c62225
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions espnet2/asr/frontend/s3prl.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def __init__(
normalize=frontend_conf.get("normalize", False),
extra_conf=frontend_conf.get("extra_conf", None),
)
if getattr(upstream.upstream.model, "feature_grad_mult", None):
upstream.upstream.model.feature_grad_mult = 1.0
upstream.eval()
if getattr(
upstream.upstream, "model", None
Expand Down
1 change: 0 additions & 1 deletion tools/extra_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ export PATH="${TOOL_DIR}"/festival/bin:"${PATH:-}"
export PATH="${TOOL_DIR}"/ffmpeg-release:"${PATH:-}"
export LD_LIBRARY_PATH="${TOOL_DIR}"/lib:"${TOOL_DIR}"/lib64:"${LD_LIBRARY_PATH:-}"
export LD_LIBRARY_PATH="${TOOL_DIR}"/espeak-ng/lib:"${LD_LIBRARY_PATH:-}"
export PYTHONPATH="${TOOL_DIR}"/s3prl:"${PYTHONPATH:-}"
export PYTHONPATH="${TOOL_DIR}"/RawNet/python/RawNet3:"${TOOL_DIR}"/RawNet/python/RawNet3/models:"${PYTHONPATH:-}"

0 comments on commit 5c62225

Please sign in to comment.