scenic icon indicating copy to clipboard operation
scenic copied to clipboard

TypeError: TextZeroShotDetectionModule.box_predictor() takes 1 positional argument but 3 were given

Open Aki1991 opened this issue 1 year ago • 1 comments

Hi all, I am trying to convert my trained jax checkpoint in to tfmodel using this notebook provided at owl_vit/notebook directory.

While trying to convert the checkpoint to model, at this stage of the notebook,

assert tf.executing_eagerly(
), 'Use eager execution to avoid FailedPreconditionError.'
convert_and_save_model(
    predict_fn,
    variables,
    input_signatures=input_signatures,
    polymorphic_shapes=polymorphic_shapes,
    model_dir=EXPORT_DIR,
    with_gradient=True,
    enable_xla=True,
    compile_model=True)

I get this error. TypeError: TextZeroShotDetectionModule.box_predictor() takes 1 positional argument but 3 were given

This happens when I use the official checkpoint (mentioned in the config file.) and also for the local checkpoint which I got after finetuning the model.

Aki1991 avatar Aug 08 '24 10:08 Aki1991

Facing same issue. Were you able to fix it?

naik24 avatar Feb 18 '25 20:02 naik24