Efficient AD train_batch_size problem #2232
Unanswered
Balporsugu21
asked this question in
Q&A
Replies: 1 comment 6 replies
-
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
from anomalib.data import MVTec
from anomalib.models import EfficientAd
from anomalib.engine import Engine
from anomalib.models import Ganomaly
from anomalib.utils.normalization import NormalizationMethod
from anomalib.data import Folder
from anomalib.data.image.folder import FolderDataset
from anomalib.metrics import F1Score
from anomalib import TaskType
datamodule = MVTec()
model = EfficientAd()
engine = Engine(
normalization=NormalizationMethod.MIN_MAX,
threshold="F1AdaptiveThreshold",
task=TaskType.CLASSIFICATION,
)
engine.fit(datamodule=datamodule, model=model)
test_results = engine.test(
model=model,
datamodule=datamodule,
ckpt_path=engine.trainer.checkpoint_callback.best_model_path,
)
After writing this code, I get this error. What should I do?
ValueError: train_batch_size for EfficientAd should be 1.
Beta Was this translation helpful? Give feedback.
All reactions