Skip to content

Commit

Permalink
Merge pull request #10 from paul-krug/pre-release-1-1
Browse files Browse the repository at this point in the history
Pre release 1 1
  • Loading branch information
paul-krug authored Mar 4, 2024
2 parents bccd4e1 + 4e083b4 commit be2b739
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ model = TCN(
embedding_shapes: Optional[ ArrayLike ] = None,
embedding_mode: str = 'add',
use_gate: bool = False,
lookahead: int = 0,
output_projection: Optional[ int ] = None,
output_activation: Optional[ str ] = None,
)
# Continue to train/use model for your task
```
Expand Down
2 changes: 1 addition & 1 deletion pytorch_tcn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from pytorch_tcn.tcn import TCN

__version__ = '1.0.0'
__version__ = '1.1.0'
17 changes: 14 additions & 3 deletions pytorch_tcn/tcn.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import numpy as np
import warnings
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import weight_norm
import numpy as np
import warnings
# Try to import new weight_norm from torch.nn.utils.parametrizations
# But also keep the deprecated version for compatibility
try:
from torch.nn.utils.parametrizations import weight_norm
except ImportError:
from torch.nn.utils import weight_norm
warnings.warn(
"""
The deprecated weight_norm from torch.nn.utils.weight_norm was imported.
Update your PyTorch version to get rid of this warning.
"""
)

from typing import Tuple
from typing import Union
Expand Down

0 comments on commit be2b739

Please sign in to comment.