visual_prompting icon indicating copy to clipboard operation
visual_prompting copied to clipboard

raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Block' object has no attribute 'drop_path'

Open senlin-ali opened this issue 2 years ago • 2 comments

raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Block' object has no attribute 'drop_path'

senlin-ali avatar Feb 09 '23 18:02 senlin-ali

using demo.ipynb with provided weights

senlin-ali avatar Feb 10 '23 03:02 senlin-ali

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.

vishaal27 avatar Feb 10 '23 13:02 vishaal27