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

Fix deprecation warnings due to invalid escape sequences. #195

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
6 changes: 3 additions & 3 deletions pretrainedmodels/models/dpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,14 @@ def __init__(
self.num_1x1_c = num_1x1_c
self.inc = inc
self.b = b
if block_type is 'proj':
if block_type == 'proj':
self.key_stride = 1
self.has_proj = True
elif block_type is 'down':
elif block_type == 'down':
self.key_stride = 2
self.has_proj = True
else:
assert block_type is 'normal'
assert block_type == 'normal'
self.key_stride = 1
self.has_proj = False

Expand Down
2 changes: 1 addition & 1 deletion pretrainedmodels/models/wideresnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def group(input, params, base, stride, n):
return o

# determine network size by parameters
blocks = [sum([re.match('group%d.block\d+.conv0.weight'%j, k) is not None
blocks = [sum([re.match(r'group%d.block\d+.conv0.weight'%j, k) is not None
for k in params.keys()]) for j in range(4)]

def f(input, params, pooling_classif=True):
Expand Down