"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "cf4b97b2337ea0144f35ed3ec9146e27ba7a44e8"
Refactor swin transfomer so later we can reuse component for 3d version (#6088)
* Use List[int] instead of int for window_size and shift_size * Make PatchMerging and SwinTransformerBlock able to handle 2d and 3d cases * Separate patch embedding from SwinTransformer and enable to get model without head by specifying num_heads=None * Dont use if before padding so it is fx friendly * Put the handling on window_size edge cases on separate function and wrap with torch.fx.wrap so it is excluded from tracing * Update the weight url to the converted weight with new structure * Update the accuracy of swin_transformer * Change assert to Exception and nit * Make num_classes optional * Add typing output for _fix_window_and_shift_size function * init head to None to make it jit scriptable * Revert the change to make num_classes optional * Revert unneccesarry changes that might be risky * Remove self.head declaration
Showing
Please register or sign in to comment