-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from kzaleskaa/feat/add-quantization
Feat/add initial quantization
- Loading branch information
Showing
21 changed files
with
1,421 additions
and
42 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
_target_: src.data.depth_datamodule.DepthDataModule | ||
data_dir: ${paths.data_dir} | ||
batch_size: 32 # Needs to be divisible by the number of devices (e.g., if in a distributed setup) | ||
num_workers: 4 | ||
batch_size: 128 # Needs to be divisible by the number of devices (e.g., if in a distributed setup) | ||
num_workers: 8 | ||
pin_memory: 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=example | ||
|
||
defaults: | ||
- override /data: depth | ||
- override /model: depth | ||
- override /callbacks: default | ||
- override /trainer: default | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
tags: ["depth", "simple_depth_net"] | ||
|
||
seed: 12345 | ||
|
||
trainer: | ||
min_epochs: 10 | ||
max_epochs: 25 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
optimizer: | ||
lr: 0.002 | ||
compile: false | ||
|
||
data: | ||
batch_size: 64 |
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,34 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=example | ||
|
||
defaults: | ||
- override /data: depth | ||
- override /model: depth | ||
- override /callbacks: default | ||
- override /trainer: default | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
tags: ["depth", "simple_depth_net"] | ||
|
||
seed: 12345 | ||
|
||
fuse_batch: true | ||
|
||
trainer: | ||
min_epochs: 10 | ||
max_epochs: 25 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
optimizer: | ||
lr: 0.002 | ||
compile: false | ||
|
||
data: | ||
batch_size: 64 | ||
|
||
save_path: fuse_batch.pty |
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,35 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=example | ||
|
||
defaults: | ||
- override /data: depth | ||
- override /model: depth | ||
- override /callbacks: default | ||
- override /trainer: default | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
tags: ["depth", "simple_depth_net"] | ||
|
||
seed: 12345 | ||
|
||
ptq: true | ||
qat: true | ||
|
||
trainer: | ||
min_epochs: 10 | ||
max_epochs: 10 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
optimizer: | ||
lr: 0.002 | ||
compile: false | ||
|
||
data: | ||
batch_size: 64 | ||
|
||
save_path: ptq_qat_channel.pty |
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,34 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=example | ||
|
||
defaults: | ||
- override /data: depth | ||
- override /model: depth | ||
- override /callbacks: default | ||
- override /trainer: default | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
tags: ["depth", "simple_depth_net"] | ||
|
||
seed: 12345 | ||
|
||
ptq: true | ||
|
||
trainer: | ||
min_epochs: 10 | ||
max_epochs: 25 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
optimizer: | ||
lr: 0.002 | ||
compile: false | ||
|
||
data: | ||
batch_size: 64 | ||
|
||
save_path: ptq_tensor.pty |
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,34 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=example | ||
|
||
defaults: | ||
- override /data: depth | ||
- override /model: depth | ||
- override /callbacks: default | ||
- override /trainer: default | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
tags: ["depth", "simple_depth_net"] | ||
|
||
seed: 12345 | ||
|
||
qat: true | ||
|
||
trainer: | ||
min_epochs: 10 | ||
max_epochs: 10 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
optimizer: | ||
lr: 0.002 | ||
compile: false | ||
|
||
data: | ||
batch_size: 64 | ||
|
||
save_path: qat_channel.pty |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# @package _global_ | ||
|
||
defaults: | ||
- _self_ | ||
- data: depth | ||
- model: depth | ||
- callbacks: default | ||
- logger: null # set logger here or use command line (e.g. `python train.py logger=tensorboard`) | ||
- trainer: default | ||
- paths: default | ||
- extras: default | ||
- hydra: default | ||
|
||
fuse_batch: false | ||
ptq: false | ||
qat: false | ||
|
||
save_path: name.pty | ||
|
||
quantizer: | ||
config: | ||
asymmetric: true | ||
backend: "qnnpack" | ||
disable_requantization_for_cat: true | ||
per_tensor: false | ||
work_dir: "quant_output" | ||
|
||
task_name: "quantization" | ||
|
||
tags: ["dev"] | ||
|
||
# passing checkpoint path is necessary for quantization | ||
ckpt_path: ??? |
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.