Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yaoyuping
nnDetection
Commits
71bc2f7a
Commit
71bc2f7a
authored
Apr 22, 2021
by
mibaumgartner
Browse files
rename models -> arch
parent
4560ce77
Changes
31
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
34 additions
and
17 deletions
+34
-17
nndet/arch/__init__.py
nndet/arch/__init__.py
+0
-0
nndet/arch/abstract.py
nndet/arch/abstract.py
+0
-0
nndet/arch/blocks/__init__.py
nndet/arch/blocks/__init__.py
+3
-0
nndet/arch/blocks/basic.py
nndet/arch/blocks/basic.py
+2
-2
nndet/arch/blocks/res.py
nndet/arch/blocks/res.py
+2
-2
nndet/arch/blocks/se.py
nndet/arch/blocks/se.py
+1
-1
nndet/arch/conv.py
nndet/arch/conv.py
+3
-3
nndet/arch/decoder/__init__.py
nndet/arch/decoder/__init__.py
+1
-0
nndet/arch/decoder/base.py
nndet/arch/decoder/base.py
+1
-1
nndet/arch/encoder/__init__.py
nndet/arch/encoder/__init__.py
+2
-0
nndet/arch/encoder/abstract.py
nndet/arch/encoder/abstract.py
+0
-0
nndet/arch/encoder/modular.py
nndet/arch/encoder/modular.py
+2
-2
nndet/arch/heads/__init__.py
nndet/arch/heads/__init__.py
+4
-0
nndet/arch/heads/classifier.py
nndet/arch/heads/classifier.py
+0
-0
nndet/arch/heads/comb.py
nndet/arch/heads/comb.py
+2
-2
nndet/arch/heads/regressor.py
nndet/arch/heads/regressor.py
+1
-1
nndet/arch/heads/segmenter.py
nndet/arch/heads/segmenter.py
+3
-3
nndet/arch/initializer.py
nndet/arch/initializer.py
+0
-0
nndet/arch/layers/__init__.py
nndet/arch/layers/__init__.py
+7
-0
nndet/arch/layers/interpolation.py
nndet/arch/layers/interpolation.py
+0
-0
No files found.
nndet/
models
/__init__.py
→
nndet/
arch
/__init__.py
View file @
71bc2f7a
File moved
nndet/
models
/abstract.py
→
nndet/
arch
/abstract.py
View file @
71bc2f7a
File moved
nndet/arch/blocks/__init__.py
0 → 100644
View file @
71bc2f7a
from
nndet.arch.blocks.basic
import
AbstractBlock
,
StackedConvBlock
,
\
StackedResidualBlock
,
StackedConvBlock2
from
nndet.arch.blocks.res
import
ResBasic
,
ResBottleneck
nndet/
models
/blocks/basic.py
→
nndet/
arch
/blocks/basic.py
View file @
71bc2f7a
...
@@ -20,8 +20,8 @@ import torch.nn as nn
...
@@ -20,8 +20,8 @@ import torch.nn as nn
from
abc
import
abstractmethod
from
abc
import
abstractmethod
from
typing
import
Sequence
,
Callable
,
Union
,
Tuple
from
typing
import
Sequence
,
Callable
,
Union
,
Tuple
from
nndet.
models
.conv
import
NdParam
from
nndet.
arch
.conv
import
NdParam
from
nndet.
models
.blocks.res
import
ResBasic
from
nndet.
arch
.blocks.res
import
ResBasic
class
AbstractBlock
(
nn
.
Module
):
class
AbstractBlock
(
nn
.
Module
):
...
...
nndet/
models
/blocks/res.py
→
nndet/
arch
/blocks/res.py
View file @
71bc2f7a
...
@@ -21,8 +21,8 @@ from typing import Sequence, Callable, Optional
...
@@ -21,8 +21,8 @@ from typing import Sequence, Callable, Optional
from
functools
import
reduce
from
functools
import
reduce
from
loguru
import
logger
from
loguru
import
logger
from
nndet.
models
.conv
import
nd_pool
from
nndet.
arch
.conv
import
nd_pool
from
nndet.
models
.conv
import
NdParam
from
nndet.
arch
.conv
import
NdParam
class
ResBasic
(
nn
.
Module
):
class
ResBasic
(
nn
.
Module
):
...
...
nndet/
models
/blocks/se.py
→
nndet/
arch
/blocks/se.py
View file @
71bc2f7a
...
@@ -18,7 +18,7 @@ import torch
...
@@ -18,7 +18,7 @@ import torch
import
torch.nn
as
nn
import
torch.nn
as
nn
from
nndet.
models
.conv
import
nd_pool
,
nd_conv
from
nndet.
arch
.conv
import
nd_pool
,
nd_conv
class
SELayer
(
nn
.
Module
):
class
SELayer
(
nn
.
Module
):
...
...
nndet/
models
/conv.py
→
nndet/
arch
/conv.py
View file @
71bc2f7a
...
@@ -18,8 +18,8 @@ import torch
...
@@ -18,8 +18,8 @@ import torch
import
torch.nn
as
nn
import
torch.nn
as
nn
from
typing
import
Union
,
Callable
,
Any
,
Optional
,
Tuple
,
Sequence
,
Type
from
typing
import
Union
,
Callable
,
Any
,
Optional
,
Tuple
,
Sequence
,
Type
from
nndet.
models
.initializer
import
InitWeights_He
from
nndet.
arch
.initializer
import
InitWeights_He
from
nndet.
models
.layers.norm
import
GroupNorm
from
nndet.
arch
.layers.norm
import
GroupNorm
NdParam
=
Union
[
int
,
Tuple
[
int
,
int
],
Tuple
[
int
,
int
,
int
]]
NdParam
=
Union
[
int
,
Tuple
[
int
,
int
],
Tuple
[
int
,
int
,
int
]]
...
@@ -415,7 +415,7 @@ def nd_norm(norm_type: str, dim: int, *args, **kwargs) -> torch.nn.Module:
...
@@ -415,7 +415,7 @@ def nd_norm(norm_type: str, dim: int, *args, **kwargs) -> torch.nn.Module:
* :class:`torch.nn.InstanceNorm2d`
* :class:`torch.nn.InstanceNorm2d`
* :class:`torch.nn.InstanceNorm3d`
* :class:`torch.nn.InstanceNorm3d`
* :class:`torch.nn.LocalResponseNorm`
* :class:`torch.nn.LocalResponseNorm`
* :class:`nndet.
models
.layers.norm.GroupNorm`
* :class:`nndet.
arch
.layers.norm.GroupNorm`
"""
"""
if
dim
is
None
:
if
dim
is
None
:
dim_str
=
""
dim_str
=
""
...
...
nndet/arch/decoder/__init__.py
0 → 100644
View file @
71bc2f7a
from
nndet.arch.decoder.fpn
import
FPN
,
UFPN
,
FPN2
nndet/
models
/decoder/base.py
→
nndet/
arch
/decoder/base.py
View file @
71bc2f7a
...
@@ -20,7 +20,7 @@ from typing import Sequence, List, Tuple, Union, Callable, Optional, TypeVar
...
@@ -20,7 +20,7 @@ from typing import Sequence, List, Tuple, Union, Callable, Optional, TypeVar
from
loguru
import
logger
from
loguru
import
logger
from
nndet.
models
.conv
import
conv_kwargs_helper
from
nndet.
arch
.conv
import
conv_kwargs_helper
from
nndet.utils
import
to_dtype
from
nndet.utils
import
to_dtype
...
...
nndet/arch/encoder/__init__.py
0 → 100644
View file @
71bc2f7a
from
nndet.arch.encoder.abstract
import
AbstractEncoder
from
nndet.arch.encoder.modular
import
Encoder
nndet/
models
/encoder/abstract.py
→
nndet/
arch
/encoder/abstract.py
View file @
71bc2f7a
File moved
nndet/
models
/encoder/modular.py
→
nndet/
arch
/encoder/modular.py
View file @
71bc2f7a
...
@@ -18,8 +18,8 @@ import torch
...
@@ -18,8 +18,8 @@ import torch
import
torch.nn
as
nn
import
torch.nn
as
nn
from
typing
import
Callable
,
Tuple
,
Sequence
,
Union
,
List
,
Dict
,
Optional
from
typing
import
Callable
,
Tuple
,
Sequence
,
Union
,
List
,
Dict
,
Optional
from
nndet.
models
.encoder.abstract
import
AbstractEncoder
from
nndet.
arch
.encoder.abstract
import
AbstractEncoder
from
nndet.
models
.blocks.basic
import
AbstractBlock
from
nndet.
arch
.blocks.basic
import
AbstractBlock
__all__
=
[
"Encoder"
]
__all__
=
[
"Encoder"
]
...
...
nndet/arch/heads/__init__.py
0 → 100644
View file @
71bc2f7a
from
nndet.arch.heads.classifier
import
ClassifierType
,
Classifier
from
nndet.arch.heads.comb
import
HeadType
,
AbstractHead
from
nndet.arch.heads.regressor
import
RegressorType
,
Regressor
from
nndet.arch.heads.segmenter
import
SegmenterType
,
Segmenter
nndet/
models
/heads/classifier.py
→
nndet/
arch
/heads/classifier.py
View file @
71bc2f7a
File moved
nndet/
models
/heads/comb.py
→
nndet/
arch
/heads/comb.py
View file @
71bc2f7a
...
@@ -23,8 +23,8 @@ from abc import abstractmethod
...
@@ -23,8 +23,8 @@ from abc import abstractmethod
from
nndet.detection.boxes
import
BoxCoderND
from
nndet.detection.boxes
import
BoxCoderND
from
nndet.detection.boxes.sampler
import
AbstractSampler
from
nndet.detection.boxes.sampler
import
AbstractSampler
from
nndet.
models
.heads.classifier
import
Classifier
from
nndet.
arch
.heads.classifier
import
Classifier
from
nndet.
models
.heads.regressor
import
Regressor
from
nndet.
arch
.heads.regressor
import
Regressor
class
AbstractHead
(
nn
.
Module
):
class
AbstractHead
(
nn
.
Module
):
...
...
nndet/
models
/heads/regressor.py
→
nndet/
arch
/heads/regressor.py
View file @
71bc2f7a
...
@@ -23,7 +23,7 @@ from abc import abstractmethod
...
@@ -23,7 +23,7 @@ from abc import abstractmethod
from
loguru
import
logger
from
loguru
import
logger
from
nndet.detection.boxes
import
box_iou
from
nndet.detection.boxes
import
box_iou
from
nndet.
models
.layers.scale
import
Scale
from
nndet.
arch
.layers.scale
import
Scale
from
torch
import
Tensor
from
torch
import
Tensor
from
nndet.losses
import
SmoothL1Loss
,
GIoULoss
from
nndet.losses
import
SmoothL1Loss
,
GIoULoss
...
...
nndet/
models
/heads/segmenter.py
→
nndet/
arch
/heads/segmenter.py
View file @
71bc2f7a
...
@@ -20,10 +20,10 @@ import torch.nn as nn
...
@@ -20,10 +20,10 @@ import torch.nn as nn
from
torch
import
Tensor
from
torch
import
Tensor
from
typing
import
Dict
,
List
,
Union
,
Sequence
,
Optional
,
Tuple
,
TypeVar
from
typing
import
Dict
,
List
,
Union
,
Sequence
,
Optional
,
Tuple
,
TypeVar
from
nndet.models.conv
import
compute_padding_for_kernel
,
conv_kwargs_helper
from
nndet.arch.conv
import
compute_padding_for_kernel
,
conv_kwargs_helper
from
nndet.models.heads.comb
import
AbstractHead
from
nndet.arch.heads.comb
import
AbstractHead
from
nndet.arch.layers.interpolation
import
InterpolateToShapes
from
nndet.losses.segmentation
import
SoftDiceLoss
,
TopKLoss
from
nndet.losses.segmentation
import
SoftDiceLoss
,
TopKLoss
from
nndet.models.layers.interpolation
import
InterpolateToShapes
class
Segmenter
(
AbstractHead
):
class
Segmenter
(
AbstractHead
):
...
...
nndet/
models
/initializer.py
→
nndet/
arch
/initializer.py
View file @
71bc2f7a
File moved
nndet/
models
/layers/__init__.py
→
nndet/
arch
/layers/__init__.py
View file @
71bc2f7a
from
nndet.
models
.layers.interpolation
import
(
from
nndet.
arch
.layers.interpolation
import
(
Interpolate
,
Interpolate
,
InterpolateToShapes
,
InterpolateToShapes
,
InterpolateToShape
,
InterpolateToShape
,
MaxPoolToShapes
,
MaxPoolToShapes
,
)
)
from
nndet.
models
.layers.norm
import
GroupNorm
from
nndet.
arch
.layers.norm
import
GroupNorm
nndet/
models
/layers/interpolation.py
→
nndet/
arch
/layers/interpolation.py
View file @
71bc2f7a
File moved
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment