Skip to content

Commit

Permalink
Revert "Optimized inference with onnx for patchcore. (#652)" (#791)
Browse files Browse the repository at this point in the history
* Revert "Optimized inference with onnx for patchcore. (#652)"

This reverts commit e965c8a.

* update changelog
  • Loading branch information
djdameln committed Dec 14, 2022
1 parent 942cada commit 32c2d19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Fixed

- Fix PatchCore performance deterioration by reverting changes to Average Pooling layer (<https://github.com/openvinotoolkit/anomalib/pull/791>)
- Fix zero seed (<https://github.com/openvinotoolkit/anomalib/pull/766>)
- Fix #699 (<https://github.com/openvinotoolkit/anomalib/pull/700>)
- 🐞 Fix folder dataset for classification tasks (<https://github.com/openvinotoolkit/anomalib/pull/708>)
Expand Down
2 changes: 1 addition & 1 deletion anomalib/models/patchcore/torch_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
self.num_neighbors = num_neighbors

self.feature_extractor = FeatureExtractor(backbone=self.backbone, pre_trained=pre_trained, layers=self.layers)
self.feature_pooler = torch.nn.AvgPool2d(3, 1, 1, count_include_pad=False)
self.feature_pooler = torch.nn.AvgPool2d(3, 1, 1)
self.anomaly_map_generator = AnomalyMapGenerator(input_size=input_size)

self.register_buffer("memory_bank", Tensor())
Expand Down

0 comments on commit 32c2d19

Please sign in to comment.