-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into train_epoch_merge_datasets_batches
# Conflicts (solved): # src/trw/train/compatibility.py # src/trw/transforms/affine.py
- Loading branch information
Showing
81 changed files
with
2,776 additions
and
1,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[mypy] | ||
mypy_path = ./src/trw | ||
cache_dir = ../.mypy_cache | ||
|
||
ignore_missing_imports = True | ||
ignore_errors = True | ||
|
||
#[mypy-src.trw.datasets.*] | ||
#ignore_errors = False | ||
|
||
[mypy-src.trw.utils.*] | ||
ignore_errors = False | ||
|
||
[mypy-src.trw.layers.*] | ||
ignore_errors = False | ||
|
||
[mypy-src.trw.transforms.*] | ||
ignore_errors = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ tensorboard | |
onnx | ||
bokeh >= 2.1 | ||
scipy | ||
typing-extensions | ||
threadpoolctl | ||
psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ | |
from . import hparams | ||
from . import simple_layers | ||
from . import arch | ||
from . import basic_typing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
from typing import Sequence, Union, Dict, Any, List | ||
from typing_extensions import Protocol # backward compatibility for python 3.6-3.7 | ||
import numpy as np | ||
import torch | ||
|
||
"""Generic numeric type""" | ||
Numeric = Union[int, float] | ||
|
||
"""Generic Shape""" | ||
Shape = Sequence[int] | ||
|
||
"""Shape expressed as [N, C, D, H, W, ...] components""" | ||
ShapeNCX = Sequence[int] | ||
|
||
"""Shape expressed as [C, D, H, W, ...] components""" | ||
ShapeCX = Sequence[int] | ||
|
||
"""Shape expressed as [D, H, W, ...] components""" | ||
ShapeX = Sequence[int] | ||
|
||
"""Generic Tensor as numpy or torch""" | ||
Tensor = Union[np.ndarray, torch.Tensor] | ||
|
||
"""Generic Tensor as numpy or torch. Must be shaped as [N, C, D, H, W, ...]""" | ||
TensorNCX = Union[np.ndarray, torch.Tensor] | ||
|
||
"""Generic Tensor as numpy or torch. Must be shaped as 2D array [N, X]""" | ||
TensorNX = Union[np.ndarray, torch.Tensor] | ||
|
||
"""Generic Tensor with th `N` and `C` components removed""" | ||
TensorX = Union[np.ndarray, torch.Tensor] | ||
|
||
|
||
"""Torch Tensor. Must be shaped as [N, C, D, H, W, ...]""" | ||
TorchTensorNCX = torch.Tensor | ||
|
||
"""Torch Tensor. Must be shaped as 2D array [N, X]""" | ||
TorchTensorNX = torch.Tensor | ||
|
||
"""Torch Tensor with th `N` and `C` components removed""" | ||
TorchTensorX = torch.Tensor | ||
|
||
|
||
"""Numpy Tensor. Must be shaped as [N, C, D, H, W, ...]""" | ||
NumpyTensorNCX = np.ndarray | ||
|
||
"""Numpy Tensor. Must be shaped as 2D array [N, X]""" | ||
NumpyTensorNX = np.ndarray | ||
|
||
"""Numpy Tensor with th `N` and `C` components removed""" | ||
NumpyTensorX = np.ndarray | ||
|
||
"""Represent a dictionary of (key, value)""" | ||
Batch = Dict[str, Any] | ||
|
||
"""Length shaped as D, H, W, ...""" | ||
Length = Sequence[float] | ||
|
||
"""Represent a data split, a dictionary of any value""" | ||
Split = Dict[str, Any] | ||
|
||
"""Represent a dataset which is composed of named data splits""" | ||
Dataset = Dict[str, Split] | ||
|
||
"""Represent a collection of datasets""" | ||
Datasets = Dict[str, Dataset] | ||
DatasetsInfo = Datasets | ||
|
||
|
||
Activation = Any | ||
|
||
|
||
NestedIntSequence = List[Sequence[int]] | ||
|
||
ConvKernels = Union[int, List[int], NestedIntSequence] | ||
ConvStrides = ConvKernels | ||
PoolingSizes = ConvKernels | ||
|
||
Stride = Union[int, Sequence[int]] | ||
KernelSize = Union[int, Sequence[int]] | ||
Padding = Union[int, str, Sequence[int]] | ||
Paddings = Union[str, int, List[int], List[str], NestedIntSequence] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.