visual_prompting
visual_prompting copied to clipboard
raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Block' object has no attribute 'drop_path'
raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Block' object has no attribute 'drop_path'
using demo.ipynb with provided weights
There's a small bug in the inference script. Change lines 202-205 in evaluate/mae_utils.py
to:
# Here we continue to the orignal block.
x = x + blk.drop_path1(x_temp)
x = x + blk.drop_path2(blk.mlp(blk.norm2(x)))
The keys in the model dict for the transformer decoder blocks are slightly different when loaded from the original checkpoint. It should work after this fix.