Skip to content

Commit

Permalink
[Fix] HRNet TIPC Config Wrong Parameter Name (PaddlePaddle#2903)
Browse files Browse the repository at this point in the history
* Fix qat_export

* in_channels->bb_channels

* Lossen checks in builder
  • Loading branch information
Bobholamovic authored Jan 11, 2023
1 parent dd049af commit 09c1306
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deploy/slim/quant/qat_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main(args):

yml_file = os.path.join(args.save_dir, 'deploy.yaml')
with open(yml_file, 'w') as file:
transforms = cfg.export_config.get('transforms', [{
transforms = cfg.val_dataset_config.get('transforms', [{
'type': 'Normalize'
}])
data = {
Expand Down
6 changes: 4 additions & 2 deletions paddleseg/cvlibs/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ def val_dataset(self) -> paddle.io.Dataset:
'No val_dataset specified in the configuration file.'
self.show_msg('val_dataset', dataset_cfg)
dataset = self.build_component(dataset_cfg)
assert len(dataset) != 0, \
'The number of samples in val_dataset is 0. Please check whether the dataset is valid.'
if len(dataset) == 0:
logger.warning(
'The number of samples in val_dataset is 0. Please ensure this is the desired behavior.'
)
return dataset

@cached_property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ model:
backbone:
type: HRNet_W48
pretrained: https://bj.bcebos.com/paddleseg/dygraph/hrnet_w48_ssld.tar.gz
in_channels: 720
bb_channels: 720
drop_prob: 0.1
proj_dim: 720

0 comments on commit 09c1306

Please sign in to comment.