Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
use schema reference properties + port changes from 'schema-updates' …
Browse files Browse the repository at this point in the history
…branch
  • Loading branch information
fmigneault-crim committed Sep 5, 2023
1 parent 54d60f9 commit a0bff40
Show file tree
Hide file tree
Showing 3 changed files with 657 additions and 407 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Added example model architecture summary text.

### Changed
- Modified `$id` if the extension schema to refer to the expected location when eventually released
Expand All @@ -15,12 +16,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[`raster:bands`][raster-band-object].
- Replaced `nodata_value` field by `nodata` to better align with the corresponding field of
[`raster:bands`][raster-band-object].
- Refactored schema to use distinct definitions and references instead of embedding all objects
within `dl-model` properties.
- Allow schema to contain other `dlm:`-prefixed elements using `patternProperties` and explicitly
deny other `additionalProperties`.
- Allow `class_name_mapping` to be directly provided as a mapping of index-based properties and class-name values.

[raster-band-object]: https://github.com/stac-extensions/raster/#raster-band-object

### Deprecated
- Specifying `class_name_mapping` by array is deprecated.
Direct mapping as an object of index to class name should be used.
For backward compatibility, mapping as array and using nested objects with `index` and `class_name` properties
is still permitted, although overly verbose compared to the direct mapping.

### Removed
- Field `nodata_value`.
- Field `dtype`.

### Fixed
- Fixed references to other STAC extensions to use the official schema links on `https://stac-extensions.github.io/`.
Expand Down
155 changes: 155 additions & 0 deletions examples/model-arch-summary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
----------------------------------------------------------------
Layer (type) Output Shape Param
================================================================
Conv2d-1 [-1, 64, 32, 32] 9,408
BatchNorm2d-2 [-1, 64, 32, 32] 128
ReLU-3 [-1, 64, 32, 32] 0
MaxPool2d-4 [-1, 64, 16, 16] 0
Conv2d-5 [-1, 64, 16, 16] 36,864
BatchNorm2d-6 [-1, 64, 16, 16] 128
ReLU-7 [-1, 64, 16, 16] 0
Conv2d-8 [-1, 64, 16, 16] 36,864
BatchNorm2d-9 [-1, 64, 16, 16] 128
ReLU-10 [-1, 64, 16, 16] 0
BasicBlock-11 [-1, 64, 16, 16] 0
Conv2d-12 [-1, 64, 16, 16] 36,864
BatchNorm2d-13 [-1, 64, 16, 16] 128
ReLU-14 [-1, 64, 16, 16] 0
Conv2d-15 [-1, 64, 16, 16] 36,864
BatchNorm2d-16 [-1, 64, 16, 16] 128
ReLU-17 [-1, 64, 16, 16] 0
BasicBlock-18 [-1, 64, 16, 16] 0
Conv2d-19 [-1, 128, 8, 8] 73,728
BatchNorm2d-20 [-1, 128, 8, 8] 256
ReLU-21 [-1, 128, 8, 8] 0
Conv2d-22 [-1, 128, 8, 8] 147,456
BatchNorm2d-23 [-1, 128, 8, 8] 256
Conv2d-24 [-1, 128, 8, 8] 8,192
BatchNorm2d-25 [-1, 128, 8, 8] 256
ReLU-26 [-1, 128, 8, 8] 0
BasicBlock-27 [-1, 128, 8, 8] 0
Conv2d-28 [-1, 128, 8, 8] 147,456
BatchNorm2d-29 [-1, 128, 8, 8] 256
ReLU-30 [-1, 128, 8, 8] 0
Conv2d-31 [-1, 128, 8, 8] 147,456
BatchNorm2d-32 [-1, 128, 8, 8] 256
ReLU-33 [-1, 128, 8, 8] 0
BasicBlock-34 [-1, 128, 8, 8] 0
Conv2d-35 [-1, 256, 4, 4] 294,912
BatchNorm2d-36 [-1, 256, 4, 4] 512
ReLU-37 [-1, 256, 4, 4] 0
Conv2d-38 [-1, 256, 4, 4] 589,824
BatchNorm2d-39 [-1, 256, 4, 4] 512
Conv2d-40 [-1, 256, 4, 4] 32,768
BatchNorm2d-41 [-1, 256, 4, 4] 512
ReLU-42 [-1, 256, 4, 4] 0
BasicBlock-43 [-1, 256, 4, 4] 0
Conv2d-44 [-1, 256, 4, 4] 589,824
BatchNorm2d-45 [-1, 256, 4, 4] 512
ReLU-46 [-1, 256, 4, 4] 0
Conv2d-47 [-1, 256, 4, 4] 589,824
BatchNorm2d-48 [-1, 256, 4, 4] 512
ReLU-49 [-1, 256, 4, 4] 0
BasicBlock-50 [-1, 256, 4, 4] 0
Conv2d-51 [-1, 512, 2, 2] 1,179,648
BatchNorm2d-52 [-1, 512, 2, 2] 1,024
ReLU-53 [-1, 512, 2, 2] 0
Conv2d-54 [-1, 512, 2, 2] 2,359,296
BatchNorm2d-55 [-1, 512, 2, 2] 1,024
Conv2d-56 [-1, 512, 2, 2] 131,072
BatchNorm2d-57 [-1, 512, 2, 2] 1,024
ReLU-58 [-1, 512, 2, 2] 0
BasicBlock-59 [-1, 512, 2, 2] 0
Conv2d-60 [-1, 512, 2, 2] 2,359,296
BatchNorm2d-61 [-1, 512, 2, 2] 1,024
ReLU-62 [-1, 512, 2, 2] 0
Conv2d-63 [-1, 512, 2, 2] 2,359,296
BatchNorm2d-64 [-1, 512, 2, 2] 1,024
ReLU-65 [-1, 512, 2, 2] 0
BasicBlock-66 [-1, 512, 2, 2] 0
MaxPool2d-67 [-1, 512, 1, 1] 0
Conv2d-68 [-1, 1024, 1, 1] 4,719,616
BatchNorm2d-69 [-1, 1024, 1, 1] 2,048
ReLU-70 [-1, 1024, 1, 1] 0
_ActivatedBatchNorm-71 [-1, 1024, 1, 1] 0
AdaptiveAvgPool2d-72 [-1, 1024, 1, 1] 0
Linear-73 [-1, 64] 65,600
ReLU-74 [-1, 64] 0
Linear-75 [-1, 1024] 66,560
Conv2d-76 [-1, 1, 1, 1] 1,024
SCSEBlock-77 [-1, 1024, 1, 1] 0
ConvTranspose2d-78 [-1, 512, 2, 2] 8,389,120
DecoderUnetSCSE-79 [-1, 512, 2, 2] 0
Conv2d-80 [-1, 1024, 2, 2] 9,438,208
BatchNorm2d-81 [-1, 1024, 2, 2] 2,048
ReLU-82 [-1, 1024, 2, 2] 0
_ActivatedBatchNorm-83 [-1, 1024, 2, 2] 0
AdaptiveAvgPool2d-84 [-1, 1024, 1, 1] 0
Linear-85 [-1, 64] 65,600
ReLU-86 [-1, 64] 0
Linear-87 [-1, 1024] 66,560
Conv2d-88 [-1, 1, 2, 2] 1,024
SCSEBlock-89 [-1, 1024, 2, 2] 0
ConvTranspose2d-90 [-1, 256, 4, 4] 4,194,560
DecoderUnetSCSE-91 [-1, 256, 4, 4] 0
Conv2d-92 [-1, 512, 4, 4] 2,359,808
BatchNorm2d-93 [-1, 512, 4, 4] 1,024
ReLU-94 [-1, 512, 4, 4] 0
_ActivatedBatchNorm-95 [-1, 512, 4, 4] 0
AdaptiveAvgPool2d-96 [-1, 512, 1, 1] 0
Linear-97 [-1, 32] 16,416
ReLU-98 [-1, 32] 0
Linear-99 [-1, 512] 16,896
Conv2d-100 [-1, 1, 4, 4] 512
SCSEBlock-101 [-1, 512, 4, 4] 0
ConvTranspose2d-102 [-1, 128, 8, 8] 1,048,704
DecoderUnetSCSE-103 [-1, 128, 8, 8] 0
Conv2d-104 [-1, 256, 8, 8] 590,080
BatchNorm2d-105 [-1, 256, 8, 8] 512
ReLU-106 [-1, 256, 8, 8] 0
_ActivatedBatchNorm-107 [-1, 256, 8, 8] 0
AdaptiveAvgPool2d-108 [-1, 256, 1, 1] 0
Linear-109 [-1, 16] 4,112
ReLU-110 [-1, 16] 0
Linear-111 [-1, 256] 4,352
Conv2d-112 [-1, 1, 8, 8] 256
SCSEBlock-113 [-1, 256, 8, 8] 0
ConvTranspose2d-114 [-1, 64, 16, 16] 262,208
DecoderUnetSCSE-115 [-1, 64, 16, 16] 0
Conv2d-116 [-1, 128, 16, 16] 147,584
BatchNorm2d-117 [-1, 128, 16, 16] 256
ReLU-118 [-1, 128, 16, 16] 0
_ActivatedBatchNorm-119 [-1, 128, 16, 16] 0
AdaptiveAvgPool2d-120 [-1, 128, 1, 1] 0
Linear-121 [-1, 8] 1,032
ReLU-122 [-1, 8] 0
Linear-123 [-1, 128] 1,152
Conv2d-124 [-1, 1, 16, 16] 128
SCSEBlock-125 [-1, 128, 16, 16] 0
ConvTranspose2d-126 [-1, 32, 32, 32] 65,568
DecoderUnetSCSE-127 [-1, 32, 32, 32] 0
Conv2d-128 [-1, 64, 32, 32] 55,360
BatchNorm2d-129 [-1, 64, 32, 32] 128
ReLU-130 [-1, 64, 32, 32] 0
ReLU-134 [-1, 4] 0
Linear-135 [-1, 64] 320
Conv2d-136 [-1, 1, 32, 32] 64
SCSEBlock-137 [-1, 64, 32, 32] 0
ConvTranspose2d-138 [-1, 16, 64, 64] 16,400
DecoderUnetSCSE-139 [-1, 16, 64, 64] 0
Conv2d-140 [-1, 64, 64, 64] 31,808
BatchNorm2d-141 [-1, 64, 64, 64] 128
ReLU-142 [-1, 64, 64, 64] 0
_ActivatedBatchNorm-143 [-1, 64, 64, 64] 0
Conv2d-144 [-1, 5, 64, 64] 325
EncoderDecoderNet-145 [-1, 5, 64, 64] 0
================================================================
Total params= 42,813,873
Trainable params= 42,813,873
Non-trainable params= 0
----------------------------------------------------------------
Input size (MB)= 0.05
Forward/backward pass size (MB)= 20.35
Params size (MB)= 163.32
Estimated Total Size (MB)= 183.72
----------------------------------------------------------------
Loading

0 comments on commit a0bff40

Please sign in to comment.