Skip to content

fixed import in python 3.11.0 #1649

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

Merged
merged 1 commit into from
Feb 1, 2023
Merged
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
9 changes: 5 additions & 4 deletions timm/models/maxxvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

import math
from collections import OrderedDict
from dataclasses import dataclass, replace
from dataclasses import dataclass, replace, field
from functools import partial
from typing import Callable, Optional, Union, Tuple, List

Expand Down Expand Up @@ -229,8 +229,8 @@ class MaxxVitCfg:
block_type: Tuple[Union[str, Tuple[str, ...]], ...] = ('C', 'C', 'T', 'T')
stem_width: Union[int, Tuple[int, int]] = 64
stem_bias: bool = True
conv_cfg: MaxxVitConvCfg = MaxxVitConvCfg()
transformer_cfg: MaxxVitTransformerCfg = MaxxVitTransformerCfg()
conv_cfg: MaxxVitConvCfg = field(default_factory=MaxxVitConvCfg)
transformer_cfg: MaxxVitTransformerCfg = field(default_factory=MaxxVitTransformerCfg)
weight_init: str = 'vit_eff'


Expand Down Expand Up @@ -1910,4 +1910,5 @@ def maxvit_large_224(pretrained=False, **kwargs):

@register_model
def maxvit_xlarge_224(pretrained=False, **kwargs):
return _create_maxxvit('maxvit_xlarge_224', pretrained=pretrained, **kwargs)
return _create_maxxvit('maxvit_xlarge_224', pretrained=pretrained, **kwargs)