Skip to content
Discussion options

You must be logged in to vote

To pass a custom model or any component, you don't need to specify model section in the config file. These sections are only needed when a full config file is used. --model flag in the CLI already specifies that the yaml file will be for the model. So, to fix this you need to do the following:

# ~~model~~: This is not needed when passed with --model flag from the CLI
class_path: anomalib.models.Padim
init_args:
  layers:
    - layer1
    - layer2
  input_size: null
  backbone: resnet18
  pre_trained: true
  n_features: null

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by samet-akcay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1737 on March 21, 2024 12:41.