pyTorchAutoForge 0.3.1.dev0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/.gitignore +3 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/PKG-INFO +1 -2
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/_version.py +2 -2
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/environment.yml +0 -1
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tensorrt/TRTengineExporter.py +1 -2
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/LabelsClasses.py +8 -2
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/base_backbones.py +1 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/efficient_net.py +11 -2
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyproject.toml +0 -1
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/LICENSE +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/README.md +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/conda_install.sh +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/matlab/CTorchModelWrapper.m +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/matlab/EnumTorchWrapperMode.m +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/matlab/TorchModelMATLABwrapper.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/matlab/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/mlflow/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/mlflow/mlflow_api.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/onnx/ModelHandlerONNx.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/onnx/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/.deprecated/torchModelOverTCP_legacy.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/tcpServerPy.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/tcp_socket_server.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/tcp_torchModel_eval.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/telegram/AutoForge_AlertSystem_bot.py.wip +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/telegram/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/telegram/bot_token_private.json +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tensorrt/.gitkeep +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tensorrt/TODO +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tensorrt/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/torch/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/torch/torchModulesIO.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/.experimental.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/DataAugmentation.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/DataloaderIndex.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/DatasetClasses.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/ImagesAugmentation.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/auxiliary_functions.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/noise_models/FrameCameraErrorModels.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/noise_models/GeometricAugs.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/noise_models/IntensityAugs.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/noise_models/NoiseErrorsAugs.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/noise_models/OpticsErrorsAugs.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/noise_models/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/vector_error_models/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ModelEvaluator.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ModelExplainer.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ModelProfiler.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ResultsPlotter.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/extra/data_analysis_tools_module.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/extra/experimental_pysr_module.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/extra/xgboost_regression_module.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/hparams_optim/ModelHparamsOptimizer.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/hparams_optim/OptunaStudyAnalyzer.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/hparams_optim/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/hparams_optim/optuna_auxiliary.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/hparams_optim/seedNewOptunaStudy.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/.deprecated/_modelBuildingFunctions.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/.deprecated/_modelBuldingBlocks.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/ModelAssembler.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/ModelAutoBuilder.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/ModelMutator.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/README.md +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/image_processing_operators.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/input_adapters.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/backbones/spatial_features_operators.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/convolutionalBlocks.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/factories/block_factories.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/fullyConnectedBlocks.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/modelBuildingBlocks.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/poolingBlocks.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/.gitignore +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/ModelTrainingManager.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/lossFunctionsClasses.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/sessionConfig.yaml +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/programs/profile_and_export_model.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/setup/AutoForgeInit.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/setup/BaseConfigClass.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/setup/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/tensorboard/tensorboard_fcns.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/DeviceManager.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/LossLandscapeVisualizer.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/TODO +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/__init__.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/argument_parsers.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/context_management.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/conversion_utils.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/pytest_test.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/rename_images.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/test_fixtures/images_fixtures.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/timing_utils.py +0 -0
- {pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/utils.py +0 -0
|
@@ -170,3 +170,6 @@ cython_debug/
|
|
|
170
170
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
171
171
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
172
172
|
#.idea/
|
|
173
|
+
.vscode/browse.vc.db
|
|
174
|
+
.vscode/browse.vc.db-shm
|
|
175
|
+
.vscode/browse.vc.db-wal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyTorchAutoForge
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: PyTorchAutoForge library is based on raw PyTorch and designed to automate DNN development, model tracking and deployment, tightly integrated with MLflow and Optuna. It supports Spiking networks libraries (WIP). Deployment can be performed using ONNX, pyTorch facilities or TensorRT (WIP). The library is designed to be compatible with Jetson Orin Nano Jetpack rev6.1, with bash script to automatically configure virtualenv.
|
|
5
5
|
Author-email: "Pietro Califano (PC)" <petercalifano.gs@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -39,7 +39,6 @@ Requires-Dist: torch; platform_machine == 'x86_64'
|
|
|
39
39
|
Requires-Dist: torchinfo
|
|
40
40
|
Requires-Dist: torchvision; platform_machine == 'x86_64'
|
|
41
41
|
Provides-Extra: cuda-all
|
|
42
|
-
Requires-Dist: pycuda; (platform_machine == 'x86_64') and extra == 'cuda-all'
|
|
43
42
|
Requires-Dist: pynvml; (platform_machine == 'x86_64') and extra == 'cuda-all'
|
|
44
43
|
Description-Content-Type: text/markdown
|
|
45
44
|
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.4.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 4, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -2,7 +2,6 @@ import tensorrt as trt
|
|
|
2
2
|
import torch
|
|
3
3
|
import numpy as np
|
|
4
4
|
import sys, os, shutil
|
|
5
|
-
import pycuda as cuda
|
|
6
5
|
import subprocess
|
|
7
6
|
from enum import Enum
|
|
8
7
|
from pyTorchAutoForge.api.onnx import ModelHandlerONNx
|
|
@@ -167,4 +166,4 @@ class TRTengineExporter:
|
|
|
167
166
|
print("Engine built successfully and saved to:", output_engine_path)
|
|
168
167
|
|
|
169
168
|
else:
|
|
170
|
-
raise ValueError("Invalid TRTengineExporterMode value. Please select TRTEXEC or PYTHON.")
|
|
169
|
+
raise ValueError("Invalid TRTengineExporterMode value. Please select TRTEXEC or PYTHON.")
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/LabelsClasses.py
RENAMED
|
@@ -30,6 +30,8 @@ class PTAF_Datakey(enum.Enum):
|
|
|
30
30
|
PHASE_ANGLE = 9 # Phase angle of the scene
|
|
31
31
|
CENTRE_OF_FIGURE = 10 # Centre of figure of the object
|
|
32
32
|
APPARENT_SIZE = 11 # Apparent size of the object in pixels
|
|
33
|
+
SUN_DIRECTION_ANGLE_FROM_X = 12 # Angle of the sun direction from the x-axis in radians
|
|
34
|
+
|
|
33
35
|
|
|
34
36
|
def get_lbl_vector_size(self):
|
|
35
37
|
# Define sizes for data keys
|
|
@@ -49,7 +51,8 @@ class PTAF_Datakey(enum.Enum):
|
|
|
49
51
|
PTAF_Datakey.REFERENCE_SIZE: 1,
|
|
50
52
|
PTAF_Datakey.PHASE_ANGLE: 1,
|
|
51
53
|
PTAF_Datakey.CENTRE_OF_FIGURE: 2, # x, y coordinates of the centre of figure
|
|
52
|
-
PTAF_Datakey.APPARENT_SIZE: 1 # Apparent size in pixels
|
|
54
|
+
PTAF_Datakey.APPARENT_SIZE: 1, # Apparent size in pixels
|
|
55
|
+
PTAF_Datakey.SUN_DIRECTION_ANGLE_FROM_X: 1 # Angle of the sun direction from the x-axis in radians
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
return sizes.get(self, None)
|
|
@@ -235,7 +238,7 @@ class AuxiliaryLabels(BaseLabelsContainer):
|
|
|
235
238
|
default=-1.0, metadata={'yaml': 'dPhaseAngleInDeg'})
|
|
236
239
|
|
|
237
240
|
light_direction_rad_angle_from_x: float = field(
|
|
238
|
-
default
|
|
241
|
+
default=-1.0, metadata={'yaml': 'dLightDirectionRadAngleFromX'})
|
|
239
242
|
|
|
240
243
|
object_shape_matrix_cam_frame: list[list[float]] = field(
|
|
241
244
|
default_factory=list, metadata={'yaml': 'dObjectShapeMatrix_CamFrame'})
|
|
@@ -311,6 +314,9 @@ class LabelsContainer(BaseLabelsContainer):
|
|
|
311
314
|
|
|
312
315
|
elif item == PTAF_Datakey.APPARENT_SIZE:
|
|
313
316
|
return float(self.geometric.obj_apparent_size_in_pix)
|
|
317
|
+
|
|
318
|
+
elif item == PTAF_Datakey.SUN_DIRECTION_ANGLE_FROM_X:
|
|
319
|
+
return float(self.auxiliary.light_direction_rad_angle_from_x)
|
|
314
320
|
|
|
315
321
|
else:
|
|
316
322
|
# Raise AttributeError to maintain standard behavior
|
|
@@ -25,6 +25,7 @@ class FeatureExtractorConfig(BaseConfigClass):
|
|
|
25
25
|
# Dimension of the final linear layer (if you want to add a linear layer)
|
|
26
26
|
output_size: int | None = None
|
|
27
27
|
remove_classifier: bool = True
|
|
28
|
+
remove_gap_layer: bool = False
|
|
28
29
|
device: torch.device | str | None = None
|
|
29
30
|
input_channels: int = 3 # Placeholder value
|
|
30
31
|
|
|
@@ -5,6 +5,7 @@ from .base_backbones import EfficientNetConfig, FeatureExtractorFactory
|
|
|
5
5
|
|
|
6
6
|
import torch
|
|
7
7
|
import torch.nn.functional as F
|
|
8
|
+
import warnings
|
|
8
9
|
from pyTorchAutoForge.model_building.backbones.spatial_features_operators import SpatialKptFeatureSoftmaxLocator
|
|
9
10
|
from pyTorchAutoForge.model_building.poolingBlocks import CustomAdaptiveMaxPool2d
|
|
10
11
|
|
|
@@ -22,7 +23,13 @@ class EfficientNetBackbone(nn.Module):
|
|
|
22
23
|
|
|
23
24
|
# Extract the “features” part all children except the final classifier/sequential
|
|
24
25
|
modules = list(model.children())[:-1]
|
|
26
|
+
|
|
25
27
|
if cfg.output_type == 'last':
|
|
28
|
+
|
|
29
|
+
if hasattr(cfg, 'remove_gap_layer'):
|
|
30
|
+
# Remove the final global average pooling layer (AdaptiveAvgPool2d) if specified in config
|
|
31
|
+
modules = modules[0] if isinstance(modules[-1], nn.AdaptiveAvgPool2d) and cfg.remove_gap_layer else modules
|
|
32
|
+
|
|
26
33
|
# Wrap as a single ModuleList so that forward is simple
|
|
27
34
|
self.feature_extractor = nn.ModuleList([nn.Sequential(*modules)])
|
|
28
35
|
|
|
@@ -35,8 +42,10 @@ class EfficientNetBackbone(nn.Module):
|
|
|
35
42
|
self.feature_extractor = nn.ModuleList(
|
|
36
43
|
list(feature_extractor_modules.children()))
|
|
37
44
|
|
|
38
|
-
# Add last layer (global adaptive pooling) from modules
|
|
39
|
-
|
|
45
|
+
# Add last layer (global adaptive pooling) from modules if not removed
|
|
46
|
+
if hasattr(cfg, 'remove_gap_layer'):
|
|
47
|
+
if isinstance(modules[-1], nn.AdaptiveAvgPool2d) and not(cfg.remove_gap_layer):
|
|
48
|
+
self.feature_extractor.append(modules[-1])
|
|
40
49
|
|
|
41
50
|
# Build average pooling layer
|
|
42
51
|
self.feature_spill_preprocessor = nn.ModuleDict()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/matlab/__init__.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/mlflow/__init__.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/mlflow/mlflow_api.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/onnx/ModelHandlerONNx.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/onnx/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/tcpServerPy.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tcp/tcp_socket_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/telegram/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tensorrt/.gitkeep
RENAMED
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/tensorrt/__init__.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/torch/__init__.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/api/torch/torchModulesIO.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/.experimental.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/DataAugmentation.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/DataloaderIndex.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/DatasetClasses.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ModelEvaluator.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ModelExplainer.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ModelProfiler.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/ResultsPlotter.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/evaluation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/hparams_optim/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/model_building/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/optimization/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/setup/AutoForgeInit.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/setup/BaseConfigClass.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/DeviceManager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/argument_parsers.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/context_management.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/conversion_utils.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/pytest_test.py
RENAMED
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/rename_images.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytorchautoforge-0.3.1.dev0 → pytorchautoforge-0.4.0}/pyTorchAutoForge/utils/timing_utils.py
RENAMED
|
File without changes
|
|
File without changes
|