-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-packages
- Loading branch information
Showing
7 changed files
with
50 additions
and
28 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
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,12 +1,15 @@ | ||
# Import the required modules | ||
from anomalib.data import MVTec | ||
from anomalib.models import Patchcore | ||
from anomalib.engine import Engine | ||
from anomalib.models import EfficientAd | ||
|
||
# Initialize the datamodule, model and engine | ||
datamodule = MVTec() | ||
model = Patchcore() | ||
engine = Engine() | ||
datamodule = MVTec(train_batch_size=1) | ||
model = EfficientAd() | ||
engine = Engine(max_epochs=5) | ||
|
||
# Train the model | ||
engine.fit(datamodule=datamodule, model=model) | ||
|
||
# Continue from a checkpoint | ||
engine.fit(datamodule=datamodule, model=model, ckpt_path="path/to/checkpoint.ckpt") |
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
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