diff --git a/.github/workflows/update_space.yml b/.github/workflows/update_space.yml new file mode 100644 index 0000000000000000000000000000000000000000..266a78ae057ac5c4e7ebf566beda10397a95cf62 --- /dev/null +++ b/.github/workflows/update_space.yml @@ -0,0 +1,28 @@ +name: Run Python script + +on: + push: + branches: + - new + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install Gradio + run: python -m pip install gradio + + - name: Log in to Hugging Face + run: python -c 'import huggingface_hub; huggingface_hub.login(token="${{ secrets.hf_token }}")' + + - name: Deploy to Spaces + run: gradio deploy diff --git a/README.md b/README.md index 60848972dab38ddfdcd32c8a15d041da4d50e51b..14e6225bf8bfa375e6e1366035067364bada21ca 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ title: cs-mixer app_file: demo.py sdk: gradio -sdk_version: 3.37.0 +sdk_version: 3.38.0 --- # PyTorch Image Models - [Sponsors](#sponsors) diff --git a/demo.py b/demo.py index 40365ad6cf6ec7f3df8acd30fcf14075df699207..c2af9f90745e4af859649302ac5552b6bc00f361 100644 --- a/demo.py +++ b/demo.py @@ -1,3 +1,5 @@ +import os +os.system("pip install datasets einops cupy-cuda11x tabulate opencv-python -U") import os, cv2, time, math print("=> Loading libraries...") @@ -117,4 +119,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(font=[gr.themes.GoogleFont("DM Sans"), with gr.Row(): gr.Examples([f"../example-imgs/{idx}.png" for idx in indices], inputs=input_image, outputs=[softmax, grad_cam], fn=predict, run_on_click=True) -demo.launch(share=True, allowed_paths=["../example-imgs"]) \ No newline at end of file +demo.launch( + share=False, debug=False, allowed_paths=["../example-imgs"], server_name="0.0.0.0", # ssl_verify=False, + server_port=8000, # ssl_certfile="/workspace/openssl/cert.pem", ssl_keyfile="/workspace/openssl/key.pem" +) \ No newline at end of file diff --git a/pytorch_grad_cam/__pycache__/__init__.cpython-310.pyc b/pytorch_grad_cam/__pycache__/__init__.cpython-310.pyc index 35d7001b3f588353e10eb38bf4793504e16dd01f..f03a1709cbe6d52de1327ac571ab2be535853650 100644 Binary files a/pytorch_grad_cam/__pycache__/__init__.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/__init__.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/ablation_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/ablation_cam.cpython-310.pyc index abcf6f1e6863999a6936568d894c3feca6e0749e..a41872ff60fb5e705fe1a3ca833459347cccaa3f 100644 Binary files a/pytorch_grad_cam/__pycache__/ablation_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/ablation_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/ablation_layer.cpython-310.pyc b/pytorch_grad_cam/__pycache__/ablation_layer.cpython-310.pyc index aa6710ff183da58da4021d25da853219f94966e4..7b5f037447abeb22b025b772e935ed02db814a17 100644 Binary files a/pytorch_grad_cam/__pycache__/ablation_layer.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/ablation_layer.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/activations_and_gradients.cpython-310.pyc b/pytorch_grad_cam/__pycache__/activations_and_gradients.cpython-310.pyc index 28bf578323e49a20ceccc58a73df73b89741c645..222dba47562689454264464ba00db011b16da0c0 100644 Binary files a/pytorch_grad_cam/__pycache__/activations_and_gradients.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/activations_and_gradients.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/base_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/base_cam.cpython-310.pyc index 88bf278965b1e64e223aa8fa0271dc173d32c544..980b6dae609bdc962ffb81fa26e32410795a2bae 100644 Binary files a/pytorch_grad_cam/__pycache__/base_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/base_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/eigen_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/eigen_cam.cpython-310.pyc index fa851f5c30cb45bec68d02c0e97038d526be8fee..fe1ae09b0cd9fac5125835bbadcc769ce97addfb 100644 Binary files a/pytorch_grad_cam/__pycache__/eigen_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/eigen_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/eigen_grad_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/eigen_grad_cam.cpython-310.pyc index 82c89689f30c26605f631c7f8031c8904e33921d..d7aa44cd67e6cdaf6793af75f223e5325440f706 100644 Binary files a/pytorch_grad_cam/__pycache__/eigen_grad_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/eigen_grad_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/fullgrad_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/fullgrad_cam.cpython-310.pyc index bb8da6d7927d02d42d6ffee92d8c9a7f3fff3470..6e0ff11b0143dd19babed065404587315a7d7b90 100644 Binary files a/pytorch_grad_cam/__pycache__/fullgrad_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/fullgrad_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/grad_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/grad_cam.cpython-310.pyc index 98cc1c7eae2193ad831c5bf1f292eae94f680a91..cde340c8330dc0fd7a81125d9164bd55d04ac106 100644 Binary files a/pytorch_grad_cam/__pycache__/grad_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/grad_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/grad_cam_elementwise.cpython-310.pyc b/pytorch_grad_cam/__pycache__/grad_cam_elementwise.cpython-310.pyc index 3fce035e3df53deb6860e063c4e10b5a48098fe1..aa3adcedabad790fbeac428aa4a99eec2aa2ecb8 100644 Binary files a/pytorch_grad_cam/__pycache__/grad_cam_elementwise.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/grad_cam_elementwise.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/grad_cam_plusplus.cpython-310.pyc b/pytorch_grad_cam/__pycache__/grad_cam_plusplus.cpython-310.pyc index 8da31f694862f6c6c84a9b6b9dfc0867e3ef82f6..c70704b980c2dcb82383c3aac44373763694ab7c 100644 Binary files a/pytorch_grad_cam/__pycache__/grad_cam_plusplus.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/grad_cam_plusplus.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/guided_backprop.cpython-310.pyc b/pytorch_grad_cam/__pycache__/guided_backprop.cpython-310.pyc index 0748342ff981b12f8b4191c574452d87b807a5d6..d8b306bc641ba78d67dab1c4ac8b71002d8a686e 100644 Binary files a/pytorch_grad_cam/__pycache__/guided_backprop.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/guided_backprop.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/hirescam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/hirescam.cpython-310.pyc index ebf46f24eb1955a89158e1ec482d198d099bd90c..077aa092d28b388101b744595bc82cabaee0c4b9 100644 Binary files a/pytorch_grad_cam/__pycache__/hirescam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/hirescam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/layer_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/layer_cam.cpython-310.pyc index 238f8ccfa871cf3d3734e6ed6f8da680dafd4908..e0a97f46ea9371633a63aebad2fde948f96032a1 100644 Binary files a/pytorch_grad_cam/__pycache__/layer_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/layer_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/random_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/random_cam.cpython-310.pyc index e4dc6a50f5855bc279278efc346a00c9fc9d8d87..9127ef07ca5c9d5115c1a176b0e4c3c8d409be9a 100644 Binary files a/pytorch_grad_cam/__pycache__/random_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/random_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/score_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/score_cam.cpython-310.pyc index 4838bf0ddc3a8792dd707e655a784342c1e40b4a..117b26662e6a97fe93d5c22cc09baf1d8a701329 100644 Binary files a/pytorch_grad_cam/__pycache__/score_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/score_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/__pycache__/xgrad_cam.cpython-310.pyc b/pytorch_grad_cam/__pycache__/xgrad_cam.cpython-310.pyc index 723f66b709e418c506a777219bb4163f8c20c0c8..eb6aa5f85895871f2f395cc07d1e0d34e8d427d2 100644 Binary files a/pytorch_grad_cam/__pycache__/xgrad_cam.cpython-310.pyc and b/pytorch_grad_cam/__pycache__/xgrad_cam.cpython-310.pyc differ diff --git a/pytorch_grad_cam/feature_factorization/__pycache__/__init__.cpython-310.pyc b/pytorch_grad_cam/feature_factorization/__pycache__/__init__.cpython-310.pyc index 30de2f49ebdb51c42ed951455eddfafae1fb4c7b..5d7fc687ee443bdf319231b520e183cb9f8f0ad7 100644 Binary files a/pytorch_grad_cam/feature_factorization/__pycache__/__init__.cpython-310.pyc and b/pytorch_grad_cam/feature_factorization/__pycache__/__init__.cpython-310.pyc differ diff --git a/pytorch_grad_cam/feature_factorization/__pycache__/deep_feature_factorization.cpython-310.pyc b/pytorch_grad_cam/feature_factorization/__pycache__/deep_feature_factorization.cpython-310.pyc index 8ce743a9cbaaf7855dad9d381af67ac6960989b7..bda167b0240fda6378676484befaa40bd1f08223 100644 Binary files a/pytorch_grad_cam/feature_factorization/__pycache__/deep_feature_factorization.cpython-310.pyc and b/pytorch_grad_cam/feature_factorization/__pycache__/deep_feature_factorization.cpython-310.pyc differ diff --git a/pytorch_grad_cam/metrics/__pycache__/__init__.cpython-310.pyc b/pytorch_grad_cam/metrics/__pycache__/__init__.cpython-310.pyc index 07f60a923914032481ba5c8c02994f2b9ab10e41..2c5d9d704cb635713f43f4389382693600fc10ab 100644 Binary files a/pytorch_grad_cam/metrics/__pycache__/__init__.cpython-310.pyc and b/pytorch_grad_cam/metrics/__pycache__/__init__.cpython-310.pyc differ diff --git a/pytorch_grad_cam/metrics/__pycache__/cam_mult_image.cpython-310.pyc b/pytorch_grad_cam/metrics/__pycache__/cam_mult_image.cpython-310.pyc index c03b53ef53b40ff86da4949b54f357d26aa1c193..263ddf9f02dc2ef9f2d7f35487d3045546c0c174 100644 Binary files a/pytorch_grad_cam/metrics/__pycache__/cam_mult_image.cpython-310.pyc and b/pytorch_grad_cam/metrics/__pycache__/cam_mult_image.cpython-310.pyc differ diff --git a/pytorch_grad_cam/metrics/__pycache__/perturbation_confidence.cpython-310.pyc b/pytorch_grad_cam/metrics/__pycache__/perturbation_confidence.cpython-310.pyc index 3ecdcd37d5ce1057f56974fb606641615b0de1eb..eb2d0a61b7ccdad42bad7f289a3e4d5457b21735 100644 Binary files a/pytorch_grad_cam/metrics/__pycache__/perturbation_confidence.cpython-310.pyc and b/pytorch_grad_cam/metrics/__pycache__/perturbation_confidence.cpython-310.pyc differ diff --git a/pytorch_grad_cam/metrics/__pycache__/road.cpython-310.pyc b/pytorch_grad_cam/metrics/__pycache__/road.cpython-310.pyc index 07c685c19983929f3d4a0cce228f96e00cdc373f..d6050c18d6981f4c24c27eb4cbf289d8749cd859 100644 Binary files a/pytorch_grad_cam/metrics/__pycache__/road.cpython-310.pyc and b/pytorch_grad_cam/metrics/__pycache__/road.cpython-310.pyc differ diff --git a/pytorch_grad_cam/utils/__pycache__/__init__.cpython-310.pyc b/pytorch_grad_cam/utils/__pycache__/__init__.cpython-310.pyc index d57ec916ef75112a9e3487afc90ccb4a4b094c98..461d97bea65234a3731404cce46132ff00411d5b 100644 Binary files a/pytorch_grad_cam/utils/__pycache__/__init__.cpython-310.pyc and b/pytorch_grad_cam/utils/__pycache__/__init__.cpython-310.pyc differ diff --git a/pytorch_grad_cam/utils/__pycache__/find_layers.cpython-310.pyc b/pytorch_grad_cam/utils/__pycache__/find_layers.cpython-310.pyc index b455b580b1aa562a79532eafa76bf0ed623a1013..d58d65f76ff59cabf6d396456cb8153e3b9d83aa 100644 Binary files a/pytorch_grad_cam/utils/__pycache__/find_layers.cpython-310.pyc and b/pytorch_grad_cam/utils/__pycache__/find_layers.cpython-310.pyc differ diff --git a/pytorch_grad_cam/utils/__pycache__/image.cpython-310.pyc b/pytorch_grad_cam/utils/__pycache__/image.cpython-310.pyc index 63c2b9fab0343d25fcc80c74acab12390ee980d3..0f0f9f94220c6bb967eb71e1a1690dd1d181e794 100644 Binary files a/pytorch_grad_cam/utils/__pycache__/image.cpython-310.pyc and b/pytorch_grad_cam/utils/__pycache__/image.cpython-310.pyc differ diff --git a/pytorch_grad_cam/utils/__pycache__/model_targets.cpython-310.pyc b/pytorch_grad_cam/utils/__pycache__/model_targets.cpython-310.pyc index 6f9713d4fd516d6684883baf38da101366e92216..be3973538ef56794d689e8581612c5b5184ecc0e 100644 Binary files a/pytorch_grad_cam/utils/__pycache__/model_targets.cpython-310.pyc and b/pytorch_grad_cam/utils/__pycache__/model_targets.cpython-310.pyc differ diff --git a/pytorch_grad_cam/utils/__pycache__/reshape_transforms.cpython-310.pyc b/pytorch_grad_cam/utils/__pycache__/reshape_transforms.cpython-310.pyc index 8a511d58e7cdd04c429dcad621a6aa083e9863d8..1845144275c6fa5dd34a0c5250baf473d21b370e 100644 Binary files a/pytorch_grad_cam/utils/__pycache__/reshape_transforms.cpython-310.pyc and b/pytorch_grad_cam/utils/__pycache__/reshape_transforms.cpython-310.pyc differ diff --git a/pytorch_grad_cam/utils/__pycache__/svd_on_activations.cpython-310.pyc b/pytorch_grad_cam/utils/__pycache__/svd_on_activations.cpython-310.pyc index ce1f6c0c9a798a340c225feef3d4fe2be27a5193..9928ac641d36290c47bf981865b4cefc6b97c7a1 100644 Binary files a/pytorch_grad_cam/utils/__pycache__/svd_on_activations.cpython-310.pyc and b/pytorch_grad_cam/utils/__pycache__/svd_on_activations.cpython-310.pyc differ diff --git a/timm/__pycache__/__init__.cpython-310.pyc b/timm/__pycache__/__init__.cpython-310.pyc index 896a0e6d48c3e45c6f8b689ef56accdfc8c2e33e..3c09eb868db01a99ab46d6a14558290cf50444a9 100644 Binary files a/timm/__pycache__/__init__.cpython-310.pyc and b/timm/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/__pycache__/version.cpython-310.pyc b/timm/__pycache__/version.cpython-310.pyc index f0cf65f924c55c8024c6bb3faef66fc35f4b9371..8cc56a9345a07575ec80a47fd700c156b5b3bb4e 100644 Binary files a/timm/__pycache__/version.cpython-310.pyc and b/timm/__pycache__/version.cpython-310.pyc differ diff --git a/timm/data/__pycache__/__init__.cpython-310.pyc b/timm/data/__pycache__/__init__.cpython-310.pyc index 27aa20f209ed8cb493bfa1ff6bd6724a8c61e5f7..940d0249f3f6a902929032cbb2d091f35c5fb4cc 100644 Binary files a/timm/data/__pycache__/__init__.cpython-310.pyc and b/timm/data/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/data/__pycache__/auto_augment.cpython-310.pyc b/timm/data/__pycache__/auto_augment.cpython-310.pyc index beba3ec987b386e8d721a84b0b2f47a44bb1db5f..41d0d3b2a92ee5dd1d0118c71d1005a1ff054d6d 100644 Binary files a/timm/data/__pycache__/auto_augment.cpython-310.pyc and b/timm/data/__pycache__/auto_augment.cpython-310.pyc differ diff --git a/timm/data/__pycache__/config.cpython-310.pyc b/timm/data/__pycache__/config.cpython-310.pyc index 9e5819bb27e4692f5dd7df24c13e29310f4dc3a8..1df205b6a9d10849088e83e44c4f36dd8dcca9a0 100644 Binary files a/timm/data/__pycache__/config.cpython-310.pyc and b/timm/data/__pycache__/config.cpython-310.pyc differ diff --git a/timm/data/__pycache__/constants.cpython-310.pyc b/timm/data/__pycache__/constants.cpython-310.pyc index e1d102784d0243c0c8171574e057d78f0253c320..d4a22ef956474319079fceb2938fbfb1e48f511f 100644 Binary files a/timm/data/__pycache__/constants.cpython-310.pyc and b/timm/data/__pycache__/constants.cpython-310.pyc differ diff --git a/timm/data/__pycache__/dataset.cpython-310.pyc b/timm/data/__pycache__/dataset.cpython-310.pyc index b68fb975079b251d6a0e0dcdeb72a4887071f426..340809eec0bd793e083dba5be6d632df45261a67 100644 Binary files a/timm/data/__pycache__/dataset.cpython-310.pyc and b/timm/data/__pycache__/dataset.cpython-310.pyc differ diff --git a/timm/data/__pycache__/dataset_factory.cpython-310.pyc b/timm/data/__pycache__/dataset_factory.cpython-310.pyc index e0b41078503db405ed623179cc96d4c2f18b69b9..0062af027f66f340e8bd991dd1944567c2584468 100644 Binary files a/timm/data/__pycache__/dataset_factory.cpython-310.pyc and b/timm/data/__pycache__/dataset_factory.cpython-310.pyc differ diff --git a/timm/data/__pycache__/dataset_info.cpython-310.pyc b/timm/data/__pycache__/dataset_info.cpython-310.pyc index ee779ffe2b35cda49b4e26fb43e9e49b3fe2c144..fe330143f1199f0930e8ac4073aff320aeccea69 100644 Binary files a/timm/data/__pycache__/dataset_info.cpython-310.pyc and b/timm/data/__pycache__/dataset_info.cpython-310.pyc differ diff --git a/timm/data/__pycache__/distributed_sampler.cpython-310.pyc b/timm/data/__pycache__/distributed_sampler.cpython-310.pyc index 5bc3e1b2ed8dee527575ac03e58135d847dca46c..2b4eb8ca0be857a8d05bd884ce6412834c036237 100644 Binary files a/timm/data/__pycache__/distributed_sampler.cpython-310.pyc and b/timm/data/__pycache__/distributed_sampler.cpython-310.pyc differ diff --git a/timm/data/__pycache__/imagenet_info.cpython-310.pyc b/timm/data/__pycache__/imagenet_info.cpython-310.pyc index 79a1dcc32d931626e9b239214b0b7843fbb1783b..a26465a52f060efc90b6a10dc9a34061f2e640c2 100644 Binary files a/timm/data/__pycache__/imagenet_info.cpython-310.pyc and b/timm/data/__pycache__/imagenet_info.cpython-310.pyc differ diff --git a/timm/data/__pycache__/loader.cpython-310.pyc b/timm/data/__pycache__/loader.cpython-310.pyc index fd85ee147793fa022b48d8bbebd88673e8c5568e..2277ac29773983831053d253a7163b2a4551f392 100644 Binary files a/timm/data/__pycache__/loader.cpython-310.pyc and b/timm/data/__pycache__/loader.cpython-310.pyc differ diff --git a/timm/data/__pycache__/mixup.cpython-310.pyc b/timm/data/__pycache__/mixup.cpython-310.pyc index 3e5c027e2a399959230012122cda8d5af55b2471..2b35836fb862be9095e14145617f4a3658106a82 100644 Binary files a/timm/data/__pycache__/mixup.cpython-310.pyc and b/timm/data/__pycache__/mixup.cpython-310.pyc differ diff --git a/timm/data/__pycache__/random_erasing.cpython-310.pyc b/timm/data/__pycache__/random_erasing.cpython-310.pyc index 04da3ac27c033639c3f3211e5d11cddb69ce7c5a..f1935cd726d2fff1734d686cd279db78727b4072 100644 Binary files a/timm/data/__pycache__/random_erasing.cpython-310.pyc and b/timm/data/__pycache__/random_erasing.cpython-310.pyc differ diff --git a/timm/data/__pycache__/real_labels.cpython-310.pyc b/timm/data/__pycache__/real_labels.cpython-310.pyc index 7508d237e75e3b84537b9eb1b2fed12356b35e28..c85f89ce489ef23f4b69b9e49ddd8b7b38989f55 100644 Binary files a/timm/data/__pycache__/real_labels.cpython-310.pyc and b/timm/data/__pycache__/real_labels.cpython-310.pyc differ diff --git a/timm/data/__pycache__/transforms.cpython-310.pyc b/timm/data/__pycache__/transforms.cpython-310.pyc index 9199f90770b63a1e122f5355d34eaf3940da49a6..c910b3756fa28ffacdd1e11c95a20838622483e2 100644 Binary files a/timm/data/__pycache__/transforms.cpython-310.pyc and b/timm/data/__pycache__/transforms.cpython-310.pyc differ diff --git a/timm/data/__pycache__/transforms_factory.cpython-310.pyc b/timm/data/__pycache__/transforms_factory.cpython-310.pyc index 6d2eafc3438b89480aa156cdace3e90e96e402bc..7c8d3491231d38e1318a2e6fb97c1c3921a44668 100644 Binary files a/timm/data/__pycache__/transforms_factory.cpython-310.pyc and b/timm/data/__pycache__/transforms_factory.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/__init__.cpython-310.pyc b/timm/data/readers/__pycache__/__init__.cpython-310.pyc index 239fc32bfe1f0857ebe60c933f69439343f5ae99..5f0bc200b0ef086e25979310cbe678ff5f8690b3 100644 Binary files a/timm/data/readers/__pycache__/__init__.cpython-310.pyc and b/timm/data/readers/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/class_map.cpython-310.pyc b/timm/data/readers/__pycache__/class_map.cpython-310.pyc index 3fbe9ef616ebdd8facf16824ec1645e14f44e6c7..4f0577c0b35d74197b78bd74c8ac75cf7a99a761 100644 Binary files a/timm/data/readers/__pycache__/class_map.cpython-310.pyc and b/timm/data/readers/__pycache__/class_map.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/img_extensions.cpython-310.pyc b/timm/data/readers/__pycache__/img_extensions.cpython-310.pyc index 64ddfe1f2b4b48fe4eae6a72538bd268fcaf8c00..5b743d0fbd1fc3e2d1598473e278417937f6940b 100644 Binary files a/timm/data/readers/__pycache__/img_extensions.cpython-310.pyc and b/timm/data/readers/__pycache__/img_extensions.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/reader.cpython-310.pyc b/timm/data/readers/__pycache__/reader.cpython-310.pyc index 5942e0c48c58ea3c39144bb571002f4df364f99f..88c274670c73f5d4e98c3947ac73f72a7820d970 100644 Binary files a/timm/data/readers/__pycache__/reader.cpython-310.pyc and b/timm/data/readers/__pycache__/reader.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/reader_factory.cpython-310.pyc b/timm/data/readers/__pycache__/reader_factory.cpython-310.pyc index afc84a33dc001e61ebd61a025fb735fbd3496b8e..0e3cbc62844545167cb44d1c551ee54985a7683f 100644 Binary files a/timm/data/readers/__pycache__/reader_factory.cpython-310.pyc and b/timm/data/readers/__pycache__/reader_factory.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/reader_image_folder.cpython-310.pyc b/timm/data/readers/__pycache__/reader_image_folder.cpython-310.pyc index 827e9ad394bec81d2c7836c6fcdf000fe71e5554..b0c784d0c9455332286f583f5a63ec56b81abe5a 100644 Binary files a/timm/data/readers/__pycache__/reader_image_folder.cpython-310.pyc and b/timm/data/readers/__pycache__/reader_image_folder.cpython-310.pyc differ diff --git a/timm/data/readers/__pycache__/reader_image_in_tar.cpython-310.pyc b/timm/data/readers/__pycache__/reader_image_in_tar.cpython-310.pyc index 3e5641a137f43a8bffc58e7da39e755eb3554f8d..114b4533e7510b80e5547bfb2c99cf571b1624bf 100644 Binary files a/timm/data/readers/__pycache__/reader_image_in_tar.cpython-310.pyc and b/timm/data/readers/__pycache__/reader_image_in_tar.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/__init__.cpython-310.pyc b/timm/layers/__pycache__/__init__.cpython-310.pyc index cffba359d08944946ef69898767723ceb46d4903..635a8b77103d07af72f14fd5c46946d5eb8eea15 100644 Binary files a/timm/layers/__pycache__/__init__.cpython-310.pyc and b/timm/layers/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/activations.cpython-310.pyc b/timm/layers/__pycache__/activations.cpython-310.pyc index d9422c15c4644266b9b5b2675b10af81d9c38313..8ecbf8ed77a1aa9b5280e403a54136f00e586a08 100644 Binary files a/timm/layers/__pycache__/activations.cpython-310.pyc and b/timm/layers/__pycache__/activations.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/activations_jit.cpython-310.pyc b/timm/layers/__pycache__/activations_jit.cpython-310.pyc index efeea27850f5b993ca54b8124030281327c5f608..54525c1839030fc9ba2e7df77d795262e3251e84 100644 Binary files a/timm/layers/__pycache__/activations_jit.cpython-310.pyc and b/timm/layers/__pycache__/activations_jit.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/activations_me.cpython-310.pyc b/timm/layers/__pycache__/activations_me.cpython-310.pyc index ddd1ee3a232d0d419d53ebb5a5dd80eba79cbf89..a2158cd06b342e50f4b8f52e6b510def85301d63 100644 Binary files a/timm/layers/__pycache__/activations_me.cpython-310.pyc and b/timm/layers/__pycache__/activations_me.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/adaptive_avgmax_pool.cpython-310.pyc b/timm/layers/__pycache__/adaptive_avgmax_pool.cpython-310.pyc index 1a23368b918fd6f8696d595ab88c2755464302c9..02ef267d0d263597b4f9a2133334a219da2631ca 100644 Binary files a/timm/layers/__pycache__/adaptive_avgmax_pool.cpython-310.pyc and b/timm/layers/__pycache__/adaptive_avgmax_pool.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/attention_pool2d.cpython-310.pyc b/timm/layers/__pycache__/attention_pool2d.cpython-310.pyc index 655d18c858877385b42fd1f52a77cff26773ac4a..6a55e314d2d8c67f6370e2ccac1b5595b0633320 100644 Binary files a/timm/layers/__pycache__/attention_pool2d.cpython-310.pyc and b/timm/layers/__pycache__/attention_pool2d.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/blur_pool.cpython-310.pyc b/timm/layers/__pycache__/blur_pool.cpython-310.pyc index 1bfa01043537d08646ebc92b35e7040d854d56bd..26ed901e4d621873e38906a66ad74dc95bdf2a59 100644 Binary files a/timm/layers/__pycache__/blur_pool.cpython-310.pyc and b/timm/layers/__pycache__/blur_pool.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/bottleneck_attn.cpython-310.pyc b/timm/layers/__pycache__/bottleneck_attn.cpython-310.pyc index 9bae787de3b406ce7814efebf5cb87fa5547338a..00aae78f8d355e2a8807d56efa4547d9924590bd 100644 Binary files a/timm/layers/__pycache__/bottleneck_attn.cpython-310.pyc and b/timm/layers/__pycache__/bottleneck_attn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/cbam.cpython-310.pyc b/timm/layers/__pycache__/cbam.cpython-310.pyc index f55db515db5d3e72ce6c335315e17d995ba5a4be..0dfac5c9902c0ec8b1f23aec817d75601fb5b9f0 100644 Binary files a/timm/layers/__pycache__/cbam.cpython-310.pyc and b/timm/layers/__pycache__/cbam.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/classifier.cpython-310.pyc b/timm/layers/__pycache__/classifier.cpython-310.pyc index d6a91cf1d0692dd6fa993e098c27b7675b877104..25d2a95fa835e8e20d5eaf708b24883a5d12682c 100644 Binary files a/timm/layers/__pycache__/classifier.cpython-310.pyc and b/timm/layers/__pycache__/classifier.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/cond_conv2d.cpython-310.pyc b/timm/layers/__pycache__/cond_conv2d.cpython-310.pyc index 8b9b27b084fc7c9837a7160ed1413cee2bb36bb0..e8d638a56f8130ed03bd218d34e21ebed79daf6f 100644 Binary files a/timm/layers/__pycache__/cond_conv2d.cpython-310.pyc and b/timm/layers/__pycache__/cond_conv2d.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/config.cpython-310.pyc b/timm/layers/__pycache__/config.cpython-310.pyc index 934464736158e585662ed53368ad6c48f2144ac5..ba4d59ebd21e8df82fa2cf45f871231583cac992 100644 Binary files a/timm/layers/__pycache__/config.cpython-310.pyc and b/timm/layers/__pycache__/config.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/conv2d_same.cpython-310.pyc b/timm/layers/__pycache__/conv2d_same.cpython-310.pyc index 136ca8e0ddd72e783be4f7e79302df7749fce840..3ac5178b2a7f36460d6b3d600bc5c96a5f20ad3b 100644 Binary files a/timm/layers/__pycache__/conv2d_same.cpython-310.pyc and b/timm/layers/__pycache__/conv2d_same.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/conv_bn_act.cpython-310.pyc b/timm/layers/__pycache__/conv_bn_act.cpython-310.pyc index 6f5c1a58fc8a96d9b6fad860cc19eb868fee7fa0..a02e8041868ab3664b68ebb963611744648951f4 100644 Binary files a/timm/layers/__pycache__/conv_bn_act.cpython-310.pyc and b/timm/layers/__pycache__/conv_bn_act.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/create_act.cpython-310.pyc b/timm/layers/__pycache__/create_act.cpython-310.pyc index 405ed5cb46cdf1e8ae626543601259f1d330fe54..d31e493c7c1141f81571d2e4515a8f7d36ca9299 100644 Binary files a/timm/layers/__pycache__/create_act.cpython-310.pyc and b/timm/layers/__pycache__/create_act.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/create_attn.cpython-310.pyc b/timm/layers/__pycache__/create_attn.cpython-310.pyc index 4c127b87c65ed6983ec1d9ddfea7d0b1328a8cae..b406f268e1b0b5f3b1c47702449ef2f8de931892 100644 Binary files a/timm/layers/__pycache__/create_attn.cpython-310.pyc and b/timm/layers/__pycache__/create_attn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/create_conv2d.cpython-310.pyc b/timm/layers/__pycache__/create_conv2d.cpython-310.pyc index 37019ac4067dfc3b7426184c611524a8333f84af..995aa5ab19403275286ebdf8430981250b11f297 100644 Binary files a/timm/layers/__pycache__/create_conv2d.cpython-310.pyc and b/timm/layers/__pycache__/create_conv2d.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/create_norm.cpython-310.pyc b/timm/layers/__pycache__/create_norm.cpython-310.pyc index ffe1a5fc876b2bfcfd052a8b8d8c87f82718f3ea..117fab437b0ee9bd6daf926adc436eb52c86e3b9 100644 Binary files a/timm/layers/__pycache__/create_norm.cpython-310.pyc and b/timm/layers/__pycache__/create_norm.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/create_norm_act.cpython-310.pyc b/timm/layers/__pycache__/create_norm_act.cpython-310.pyc index bcb22b49ada7812a15639184ab17b97717140ad8..c2dfa345da85498c448bd02116fa39f5b08c07d4 100644 Binary files a/timm/layers/__pycache__/create_norm_act.cpython-310.pyc and b/timm/layers/__pycache__/create_norm_act.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/drop.cpython-310.pyc b/timm/layers/__pycache__/drop.cpython-310.pyc index af670b98a8abb97f8aa753a503858087dfdc8939..499e64f2afe6dcc1cca92d27424f432ace1f6baf 100644 Binary files a/timm/layers/__pycache__/drop.cpython-310.pyc and b/timm/layers/__pycache__/drop.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/eca.cpython-310.pyc b/timm/layers/__pycache__/eca.cpython-310.pyc index 99d6247c2a7418d829eaf86313ecef87509074d2..cddc037364b21ae7093ce0db1069f75fecc20a0a 100644 Binary files a/timm/layers/__pycache__/eca.cpython-310.pyc and b/timm/layers/__pycache__/eca.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/evo_norm.cpython-310.pyc b/timm/layers/__pycache__/evo_norm.cpython-310.pyc index 9c262eaeb6605b8859d3dc8c66a8b63e0cdf36e5..fa68aec3b106954698ade1724e475aaa1448d7c0 100644 Binary files a/timm/layers/__pycache__/evo_norm.cpython-310.pyc and b/timm/layers/__pycache__/evo_norm.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/fast_norm.cpython-310.pyc b/timm/layers/__pycache__/fast_norm.cpython-310.pyc index 9ae75813126dbc9e526baaea0d704aa79a73fe32..b24bc19b750311862cfa6ee8314dcce55652310c 100644 Binary files a/timm/layers/__pycache__/fast_norm.cpython-310.pyc and b/timm/layers/__pycache__/fast_norm.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/filter_response_norm.cpython-310.pyc b/timm/layers/__pycache__/filter_response_norm.cpython-310.pyc index 9211b2e88eaf0b6d8a02439943162314b2e84840..b2e51204c0d7cbea2883c765cba98557db6ff196 100644 Binary files a/timm/layers/__pycache__/filter_response_norm.cpython-310.pyc and b/timm/layers/__pycache__/filter_response_norm.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/format.cpython-310.pyc b/timm/layers/__pycache__/format.cpython-310.pyc index 1c51181a042af0d9af5292291956cf68a022fb2e..f7cadb495cb7b8521afda1db3495c0d4ddd6413c 100644 Binary files a/timm/layers/__pycache__/format.cpython-310.pyc and b/timm/layers/__pycache__/format.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/gather_excite.cpython-310.pyc b/timm/layers/__pycache__/gather_excite.cpython-310.pyc index 3b8b03b5fa3b221160dd4a121adcb4cd61ca5403..bd75b82420d67a3fc0d25f68401bc3c5b5a2d3bb 100644 Binary files a/timm/layers/__pycache__/gather_excite.cpython-310.pyc and b/timm/layers/__pycache__/gather_excite.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/global_context.cpython-310.pyc b/timm/layers/__pycache__/global_context.cpython-310.pyc index 406f83402d70ff624ecaf3845bd6be4ac33afdd6..4630fa1ac6b664181605821131620a4d474c361f 100644 Binary files a/timm/layers/__pycache__/global_context.cpython-310.pyc and b/timm/layers/__pycache__/global_context.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/grn.cpython-310.pyc b/timm/layers/__pycache__/grn.cpython-310.pyc index 150a4621f281d9a47dcf0cf767809512522f19f5..77d24ac66e1f82da5c3eff1b30c85b2b7a68b592 100644 Binary files a/timm/layers/__pycache__/grn.cpython-310.pyc and b/timm/layers/__pycache__/grn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/halo_attn.cpython-310.pyc b/timm/layers/__pycache__/halo_attn.cpython-310.pyc index a588a1629a28e34027796dac4fe152c7b93a0291..67a22f0820e18449a438541703c51490c234f3b5 100644 Binary files a/timm/layers/__pycache__/halo_attn.cpython-310.pyc and b/timm/layers/__pycache__/halo_attn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/helpers.cpython-310.pyc b/timm/layers/__pycache__/helpers.cpython-310.pyc index 4f4ac9436e0d517784a837478e8bf5030a546418..4e7ea754416bd91a9e01cda352b9b7a827cc0022 100644 Binary files a/timm/layers/__pycache__/helpers.cpython-310.pyc and b/timm/layers/__pycache__/helpers.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/inplace_abn.cpython-310.pyc b/timm/layers/__pycache__/inplace_abn.cpython-310.pyc index dee36a3a7b861ffc636b9cbab8621efc080db8f6..e84c280da1ad07f4c193d1d41d0ad0549be5fea3 100644 Binary files a/timm/layers/__pycache__/inplace_abn.cpython-310.pyc and b/timm/layers/__pycache__/inplace_abn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/lambda_layer.cpython-310.pyc b/timm/layers/__pycache__/lambda_layer.cpython-310.pyc index 9f302c5c61f9b05e40c942e8a27505f85b3a39ad..bd10825d3955da3b73dbcf17df1bf529450ae6c8 100644 Binary files a/timm/layers/__pycache__/lambda_layer.cpython-310.pyc and b/timm/layers/__pycache__/lambda_layer.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/linear.cpython-310.pyc b/timm/layers/__pycache__/linear.cpython-310.pyc index de25257609bea48e203e58176b00c8982d36e19d..358f814f9bcb91799e9381dd1cc54e19228f9993 100644 Binary files a/timm/layers/__pycache__/linear.cpython-310.pyc and b/timm/layers/__pycache__/linear.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/mixed_conv2d.cpython-310.pyc b/timm/layers/__pycache__/mixed_conv2d.cpython-310.pyc index d527470ed11a760e700d55c11d7832d184dc0973..ce55385a14bc91e8e000cf199ea4bfaba1880367 100644 Binary files a/timm/layers/__pycache__/mixed_conv2d.cpython-310.pyc and b/timm/layers/__pycache__/mixed_conv2d.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/mlp.cpython-310.pyc b/timm/layers/__pycache__/mlp.cpython-310.pyc index 2297727b20175049e6098d5dc4b30cd14f14916f..0256958f288ec036fbd88e6daaf9429a1ef18f91 100644 Binary files a/timm/layers/__pycache__/mlp.cpython-310.pyc and b/timm/layers/__pycache__/mlp.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/non_local_attn.cpython-310.pyc b/timm/layers/__pycache__/non_local_attn.cpython-310.pyc index 953b3475279b88931b59a94f4ec6490ececc9681..0df1b1576b5718e9f5f89590c5c683895c3e3b01 100644 Binary files a/timm/layers/__pycache__/non_local_attn.cpython-310.pyc and b/timm/layers/__pycache__/non_local_attn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/norm.cpython-310.pyc b/timm/layers/__pycache__/norm.cpython-310.pyc index ff6cdbde10c86975b3535cfb34458a07550c98fd..8673e1f9af5a03268ff0345c2e7696384ca46b0d 100644 Binary files a/timm/layers/__pycache__/norm.cpython-310.pyc and b/timm/layers/__pycache__/norm.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/norm_act.cpython-310.pyc b/timm/layers/__pycache__/norm_act.cpython-310.pyc index 5a5f7e3af40660bfb17c2449f167708beda8f43b..8a9753c3cdabebcf593ca1c637960d27fee520d3 100644 Binary files a/timm/layers/__pycache__/norm_act.cpython-310.pyc and b/timm/layers/__pycache__/norm_act.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/padding.cpython-310.pyc b/timm/layers/__pycache__/padding.cpython-310.pyc index a62e9a7bf4ea1bcc22fcd154f75bacdace845ee5..dad4a2d65935133ba2e5e8b698cea835de8cc821 100644 Binary files a/timm/layers/__pycache__/padding.cpython-310.pyc and b/timm/layers/__pycache__/padding.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/patch_dropout.cpython-310.pyc b/timm/layers/__pycache__/patch_dropout.cpython-310.pyc index f48bde27b8d54001e78c5f3cc20388386a86e360..c3380b64db23ee6b4a4dca71cc3308f9c03a1645 100644 Binary files a/timm/layers/__pycache__/patch_dropout.cpython-310.pyc and b/timm/layers/__pycache__/patch_dropout.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/patch_embed.cpython-310.pyc b/timm/layers/__pycache__/patch_embed.cpython-310.pyc index 44ace444c590417fb20dccb5e12efb67973ae788..fe16facabd4c22858ed64e8677d1253534897873 100644 Binary files a/timm/layers/__pycache__/patch_embed.cpython-310.pyc and b/timm/layers/__pycache__/patch_embed.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/pool2d_same.cpython-310.pyc b/timm/layers/__pycache__/pool2d_same.cpython-310.pyc index 4dffbc854d0d8a5ba7810a653655f1f91840a532..2f950459c72e33e45b216bffd7c02a12cefc7b71 100644 Binary files a/timm/layers/__pycache__/pool2d_same.cpython-310.pyc and b/timm/layers/__pycache__/pool2d_same.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/pos_embed.cpython-310.pyc b/timm/layers/__pycache__/pos_embed.cpython-310.pyc index b0b6208501b7d0eeb3a88a29becd003074aad278..d1de7372247f601b273f75f24c9fc83b42d19786 100644 Binary files a/timm/layers/__pycache__/pos_embed.cpython-310.pyc and b/timm/layers/__pycache__/pos_embed.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/pos_embed_rel.cpython-310.pyc b/timm/layers/__pycache__/pos_embed_rel.cpython-310.pyc index 50b472099ad9df22610f229d1b073ff95e75e1e9..de5df0be361ae245c745c674462de9e6f7295c07 100644 Binary files a/timm/layers/__pycache__/pos_embed_rel.cpython-310.pyc and b/timm/layers/__pycache__/pos_embed_rel.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/pos_embed_sincos.cpython-310.pyc b/timm/layers/__pycache__/pos_embed_sincos.cpython-310.pyc index 88fb15a373d2128043b345db60b7552772cefa9a..dfa82e28a8ddf9cd3bd8014dbed0c85cb28be75a 100644 Binary files a/timm/layers/__pycache__/pos_embed_sincos.cpython-310.pyc and b/timm/layers/__pycache__/pos_embed_sincos.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/selective_kernel.cpython-310.pyc b/timm/layers/__pycache__/selective_kernel.cpython-310.pyc index c50a51bffb3e0b9a7aa0e6e0a4f6c479d3a4ecf4..eb105f6edefdbfdb95acd3fa9a31e85723a5cbbb 100644 Binary files a/timm/layers/__pycache__/selective_kernel.cpython-310.pyc and b/timm/layers/__pycache__/selective_kernel.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/separable_conv.cpython-310.pyc b/timm/layers/__pycache__/separable_conv.cpython-310.pyc index 9621150f47f236882d15f2199fcf4706ff3f4747..8b61648157d9219b4a7b19bc0097e8a7497a681e 100644 Binary files a/timm/layers/__pycache__/separable_conv.cpython-310.pyc and b/timm/layers/__pycache__/separable_conv.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/space_to_depth.cpython-310.pyc b/timm/layers/__pycache__/space_to_depth.cpython-310.pyc index fd9a1fdce0968bb976e810e8bb2e046f0ddc1923..4a6c871a0d9923a94a894578fca45053f0169733 100644 Binary files a/timm/layers/__pycache__/space_to_depth.cpython-310.pyc and b/timm/layers/__pycache__/space_to_depth.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/split_attn.cpython-310.pyc b/timm/layers/__pycache__/split_attn.cpython-310.pyc index c30fed4b94bcd0b9d934ecebe19ff908ba3b3878..456a788ea67f3af77e3c319cbb223044e74b18d2 100644 Binary files a/timm/layers/__pycache__/split_attn.cpython-310.pyc and b/timm/layers/__pycache__/split_attn.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/split_batchnorm.cpython-310.pyc b/timm/layers/__pycache__/split_batchnorm.cpython-310.pyc index 5daab44a72b7fcb3dcdb3a4bd5eaa69604e2e4e3..69c06ca565a730c1c4fbd5235714af1e9238514f 100644 Binary files a/timm/layers/__pycache__/split_batchnorm.cpython-310.pyc and b/timm/layers/__pycache__/split_batchnorm.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/squeeze_excite.cpython-310.pyc b/timm/layers/__pycache__/squeeze_excite.cpython-310.pyc index be4ea720de1d29c651110c8edfc4c2a8caf054ac..c354ddb76d76953d5597f091fddb21ed35317c12 100644 Binary files a/timm/layers/__pycache__/squeeze_excite.cpython-310.pyc and b/timm/layers/__pycache__/squeeze_excite.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/std_conv.cpython-310.pyc b/timm/layers/__pycache__/std_conv.cpython-310.pyc index 5dd67db6fb44ea6226ed3b82bb73485a5e122aed..f8eb1d3c21880c51461bd0dda53055e5ea14fbe8 100644 Binary files a/timm/layers/__pycache__/std_conv.cpython-310.pyc and b/timm/layers/__pycache__/std_conv.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/test_time_pool.cpython-310.pyc b/timm/layers/__pycache__/test_time_pool.cpython-310.pyc index b8c5cca2695ac6d23113c9d48486ba87445af5bd..0f0f1e802b820158d32fe7f2ba9bd221abddc379 100644 Binary files a/timm/layers/__pycache__/test_time_pool.cpython-310.pyc and b/timm/layers/__pycache__/test_time_pool.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/trace_utils.cpython-310.pyc b/timm/layers/__pycache__/trace_utils.cpython-310.pyc index 73f2c77f23b711b1bf44b535390c498b94e483e0..3afe7c8545ae0993b3160f355e4b74dc8a10cc18 100644 Binary files a/timm/layers/__pycache__/trace_utils.cpython-310.pyc and b/timm/layers/__pycache__/trace_utils.cpython-310.pyc differ diff --git a/timm/layers/__pycache__/weight_init.cpython-310.pyc b/timm/layers/__pycache__/weight_init.cpython-310.pyc index 86c8f5ed8ac0092d2a0a1173fdfe57a2a4051c44..45af5c0a1868ed5c86d30b03625eeebe5cd0cde3 100644 Binary files a/timm/layers/__pycache__/weight_init.cpython-310.pyc and b/timm/layers/__pycache__/weight_init.cpython-310.pyc differ diff --git a/timm/models/__pycache__/__init__.cpython-310.pyc b/timm/models/__pycache__/__init__.cpython-310.pyc index f03b84789a3bff2ebf8cbea6587bd5d6bfd88927..4e99b2632b6fd0ac43ec63f837004961780949fd 100644 Binary files a/timm/models/__pycache__/__init__.cpython-310.pyc and b/timm/models/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_builder.cpython-310.pyc b/timm/models/__pycache__/_builder.cpython-310.pyc index 8f992e0ac556aece7f5fb341ba716339aa028d04..47170fd97d7e9e8941bec34fbc3e9b2026cb5a86 100644 Binary files a/timm/models/__pycache__/_builder.cpython-310.pyc and b/timm/models/__pycache__/_builder.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_efficientnet_blocks.cpython-310.pyc b/timm/models/__pycache__/_efficientnet_blocks.cpython-310.pyc index 0d5f63f1b8ff09d47e25ebb98fe089db8fe3a1a2..2ccc67da1867e5fddf76ee18565334f7180338f7 100644 Binary files a/timm/models/__pycache__/_efficientnet_blocks.cpython-310.pyc and b/timm/models/__pycache__/_efficientnet_blocks.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_efficientnet_builder.cpython-310.pyc b/timm/models/__pycache__/_efficientnet_builder.cpython-310.pyc index 6a2d465807f01d7e56730eaaf49150c43d5552f7..e1ab55449f9f35bba622e30b557699d223eeb9d9 100644 Binary files a/timm/models/__pycache__/_efficientnet_builder.cpython-310.pyc and b/timm/models/__pycache__/_efficientnet_builder.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_factory.cpython-310.pyc b/timm/models/__pycache__/_factory.cpython-310.pyc index 54f83a1984c7b3e0f41b969c45f39aad7190613c..aabfbf9dbfa5265d142a951cd214069e33a129e4 100644 Binary files a/timm/models/__pycache__/_factory.cpython-310.pyc and b/timm/models/__pycache__/_factory.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_features.cpython-310.pyc b/timm/models/__pycache__/_features.cpython-310.pyc index b9f2f1ba7af4c1432ebe95079985d32162857742..9f3aa59da25154918509391bea802f5ee8ebe327 100644 Binary files a/timm/models/__pycache__/_features.cpython-310.pyc and b/timm/models/__pycache__/_features.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_features_fx.cpython-310.pyc b/timm/models/__pycache__/_features_fx.cpython-310.pyc index 2081f2ad62bbde15bb507eddcb0263cd03b5f6c3..7b4f592e6c612d07d503bf2cbe9e76f7ef9e4573 100644 Binary files a/timm/models/__pycache__/_features_fx.cpython-310.pyc and b/timm/models/__pycache__/_features_fx.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_helpers.cpython-310.pyc b/timm/models/__pycache__/_helpers.cpython-310.pyc index 6433ef08551d51745cacc834ea2e0f8a45de734a..9eaf841b336851dac4f6255d952242db77c1baaa 100644 Binary files a/timm/models/__pycache__/_helpers.cpython-310.pyc and b/timm/models/__pycache__/_helpers.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_hub.cpython-310.pyc b/timm/models/__pycache__/_hub.cpython-310.pyc index 888807efef493314cb94cc390853198ddd064f58..561638067909657b5557742835e3bd90218b91a4 100644 Binary files a/timm/models/__pycache__/_hub.cpython-310.pyc and b/timm/models/__pycache__/_hub.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_manipulate.cpython-310.pyc b/timm/models/__pycache__/_manipulate.cpython-310.pyc index 1eb0d929e55abf3839ac513d58443b7c9c323862..c0faf8a529ae557cfaabb3d404f010054f096f79 100644 Binary files a/timm/models/__pycache__/_manipulate.cpython-310.pyc and b/timm/models/__pycache__/_manipulate.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_pretrained.cpython-310.pyc b/timm/models/__pycache__/_pretrained.cpython-310.pyc index 9c29439b407d192c1ec657e4159a1c1e99fa0c8c..1fcf8b5a398448fd67b00d1c556b75c9c9d4c997 100644 Binary files a/timm/models/__pycache__/_pretrained.cpython-310.pyc and b/timm/models/__pycache__/_pretrained.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_prune.cpython-310.pyc b/timm/models/__pycache__/_prune.cpython-310.pyc index e7d6e1d50b2da7f320f782fb0ef9202a82317a23..d098831b5bb8761a025229c9a11ecf3fc4913996 100644 Binary files a/timm/models/__pycache__/_prune.cpython-310.pyc and b/timm/models/__pycache__/_prune.cpython-310.pyc differ diff --git a/timm/models/__pycache__/_registry.cpython-310.pyc b/timm/models/__pycache__/_registry.cpython-310.pyc index 0b320df93c84efa0826e488d30b6fb60d7b2fddd..e32bfc9c3115b00cd3442d9a9557967881baa240 100644 Binary files a/timm/models/__pycache__/_registry.cpython-310.pyc and b/timm/models/__pycache__/_registry.cpython-310.pyc differ diff --git a/timm/models/__pycache__/beit.cpython-310.pyc b/timm/models/__pycache__/beit.cpython-310.pyc index 53ccd9ea5cb9fd182f851f7547b81ebd5a9fdb92..0fd1c05fc2e324e4341c2d7fea1a84b2edafbc95 100644 Binary files a/timm/models/__pycache__/beit.cpython-310.pyc and b/timm/models/__pycache__/beit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/byoanet.cpython-310.pyc b/timm/models/__pycache__/byoanet.cpython-310.pyc index 0eed34234aa6860113e64249ccb2693dfbe31074..0c2f99ae9e68d70ac98b74af9211e03fbe61e54d 100644 Binary files a/timm/models/__pycache__/byoanet.cpython-310.pyc and b/timm/models/__pycache__/byoanet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/byobnet.cpython-310.pyc b/timm/models/__pycache__/byobnet.cpython-310.pyc index 48deabebec73c0466d696b6fa42ceffa74a1b164..427e8ce6ac50a87b56097a01afdeb6a2b2b6f20f 100644 Binary files a/timm/models/__pycache__/byobnet.cpython-310.pyc and b/timm/models/__pycache__/byobnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/cait.cpython-310.pyc b/timm/models/__pycache__/cait.cpython-310.pyc index d55ed53920d328bdfe2ad57aa72179ec8bc03488..49de3c7f7a8b54f80758fc146fc226bf04a65aec 100644 Binary files a/timm/models/__pycache__/cait.cpython-310.pyc and b/timm/models/__pycache__/cait.cpython-310.pyc differ diff --git a/timm/models/__pycache__/coat.cpython-310.pyc b/timm/models/__pycache__/coat.cpython-310.pyc index 2df614b586a6194a3dbace4e26e76310ee5cdc1b..8566433e273f6188777997bb3ffea274f5ec2d63 100644 Binary files a/timm/models/__pycache__/coat.cpython-310.pyc and b/timm/models/__pycache__/coat.cpython-310.pyc differ diff --git a/timm/models/__pycache__/convit.cpython-310.pyc b/timm/models/__pycache__/convit.cpython-310.pyc index e790682b74c245b3bc0e7231694284753eef8d44..5ad890400936e9b6e13da822404e21c841618b10 100644 Binary files a/timm/models/__pycache__/convit.cpython-310.pyc and b/timm/models/__pycache__/convit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/convmixer.cpython-310.pyc b/timm/models/__pycache__/convmixer.cpython-310.pyc index f05edc2d02eb47777cedff046103d40544dd6865..1bd82658ee20081639409714495a2ad0bec2b7e7 100644 Binary files a/timm/models/__pycache__/convmixer.cpython-310.pyc and b/timm/models/__pycache__/convmixer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/convnext.cpython-310.pyc b/timm/models/__pycache__/convnext.cpython-310.pyc index 37472804b4e9db0e6f4471bd8c535d9e8e47cd20..c1c1011c868a4d111ecea0ad7f0b006751d716ec 100644 Binary files a/timm/models/__pycache__/convnext.cpython-310.pyc and b/timm/models/__pycache__/convnext.cpython-310.pyc differ diff --git a/timm/models/__pycache__/crossvit.cpython-310.pyc b/timm/models/__pycache__/crossvit.cpython-310.pyc index cc5d6e090f26f6ce9d741b63118ea323b8f47230..bd950cee2daed6ae6545b35e24d88b2ed2f1f42d 100644 Binary files a/timm/models/__pycache__/crossvit.cpython-310.pyc and b/timm/models/__pycache__/crossvit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/cspnet.cpython-310.pyc b/timm/models/__pycache__/cspnet.cpython-310.pyc index 51ebc0127762eb081dcc13d6603aba32153f35ba..65a68a3aa5e202a8f5e2adaab4dd8ccba547a1fb 100644 Binary files a/timm/models/__pycache__/cspnet.cpython-310.pyc and b/timm/models/__pycache__/cspnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/cswinmlp.cpython-310.pyc b/timm/models/__pycache__/cswinmlp.cpython-310.pyc index 277a305546d3813590fb30ee43cf06556440d811..174674001efa49cd6ef7ff57d980f2f424262730 100644 Binary files a/timm/models/__pycache__/cswinmlp.cpython-310.pyc and b/timm/models/__pycache__/cswinmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/davit.cpython-310.pyc b/timm/models/__pycache__/davit.cpython-310.pyc index e60d45a5f8d3df66db63ea422f106ceedffdabab..a4aebb51eecabd0352926434d2744926b95ac7f5 100644 Binary files a/timm/models/__pycache__/davit.cpython-310.pyc and b/timm/models/__pycache__/davit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/deit.cpython-310.pyc b/timm/models/__pycache__/deit.cpython-310.pyc index a98ae73dfb18fc758c24f16e6658482bbcbd54f3..89d6a808f0048d2ea0a8aae79727cbc33a893e19 100644 Binary files a/timm/models/__pycache__/deit.cpython-310.pyc and b/timm/models/__pycache__/deit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/densenet.cpython-310.pyc b/timm/models/__pycache__/densenet.cpython-310.pyc index ed153159ee6abcf9d0541287f81e0ec04d690f8f..ef5adf07bb19fe4d62f5405055a3b210a1fc25a7 100644 Binary files a/timm/models/__pycache__/densenet.cpython-310.pyc and b/timm/models/__pycache__/densenet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/dla.cpython-310.pyc b/timm/models/__pycache__/dla.cpython-310.pyc index 3869ebdab87c34a95e37c320251cd62159cdee5b..1ca54e1443995ab94292c38ced6542f4b352c21d 100644 Binary files a/timm/models/__pycache__/dla.cpython-310.pyc and b/timm/models/__pycache__/dla.cpython-310.pyc differ diff --git a/timm/models/__pycache__/dpn.cpython-310.pyc b/timm/models/__pycache__/dpn.cpython-310.pyc index 5a2eafa626b4315496ed8b66d3f3ed14fbdc72d4..3d2128f7b0fb13d70181eb5dcfc1bef74aae7d57 100644 Binary files a/timm/models/__pycache__/dpn.cpython-310.pyc and b/timm/models/__pycache__/dpn.cpython-310.pyc differ diff --git a/timm/models/__pycache__/dynalike.cpython-310.pyc b/timm/models/__pycache__/dynalike.cpython-310.pyc index 29e180ee4b05924aff03c68b65d02355cbe1c950..a18b8572c7af7e03f49f13d9416af1a74195088b 100644 Binary files a/timm/models/__pycache__/dynalike.cpython-310.pyc and b/timm/models/__pycache__/dynalike.cpython-310.pyc differ diff --git a/timm/models/__pycache__/dynamixer.cpython-310.pyc b/timm/models/__pycache__/dynamixer.cpython-310.pyc index f88a4495940b64e907249cc6a135b53720ec2421..b8bf4fb8ac657f5d45ae8326ac3879fe8dbf4f97 100644 Binary files a/timm/models/__pycache__/dynamixer.cpython-310.pyc and b/timm/models/__pycache__/dynamixer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/edgenext.cpython-310.pyc b/timm/models/__pycache__/edgenext.cpython-310.pyc index c2b5be6961e42fd1af0cc5e5cc73948a5db5d058..dfbb767ea68b98257186429371c5994b64e38037 100644 Binary files a/timm/models/__pycache__/edgenext.cpython-310.pyc and b/timm/models/__pycache__/edgenext.cpython-310.pyc differ diff --git a/timm/models/__pycache__/efficientformer.cpython-310.pyc b/timm/models/__pycache__/efficientformer.cpython-310.pyc index 77f6cefb0a340615451fe45e728946aa678a6920..05d4bd6aca507ac90e0d0b0c0dee790afb749b06 100644 Binary files a/timm/models/__pycache__/efficientformer.cpython-310.pyc and b/timm/models/__pycache__/efficientformer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/efficientformer_v2.cpython-310.pyc b/timm/models/__pycache__/efficientformer_v2.cpython-310.pyc index da57a6457c9659e9211130f595789407e6ea97d6..e499a522eed41eaff595486c427aacc34fface63 100644 Binary files a/timm/models/__pycache__/efficientformer_v2.cpython-310.pyc and b/timm/models/__pycache__/efficientformer_v2.cpython-310.pyc differ diff --git a/timm/models/__pycache__/efficientnet.cpython-310.pyc b/timm/models/__pycache__/efficientnet.cpython-310.pyc index 232ceae28581882e7d8e007dd28ba577cdddd91b..e3f6811ff1e23e5dfc89857c9a984d6bb3d0dd21 100644 Binary files a/timm/models/__pycache__/efficientnet.cpython-310.pyc and b/timm/models/__pycache__/efficientnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/eva.cpython-310.pyc b/timm/models/__pycache__/eva.cpython-310.pyc index e6df3557247f25db3d9ed11fb01a9cd9b57f8e30..cadcfdccdc2ddc53e9a2060db7c6382dd42a3179 100644 Binary files a/timm/models/__pycache__/eva.cpython-310.pyc and b/timm/models/__pycache__/eva.cpython-310.pyc differ diff --git a/timm/models/__pycache__/focalnet.cpython-310.pyc b/timm/models/__pycache__/focalnet.cpython-310.pyc index 82b123b3bafecb3fdbc1a237c2b331851cfc7315..3a21f74f952c24d55f97778e9ddaadfffedfd1f8 100644 Binary files a/timm/models/__pycache__/focalnet.cpython-310.pyc and b/timm/models/__pycache__/focalnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/ftmlp.cpython-310.pyc b/timm/models/__pycache__/ftmlp.cpython-310.pyc index db9e8f0ab0a384745820f8af29010530f34745d5..c5f490fbb2c793974f3f6452d86dcb75a14f702b 100644 Binary files a/timm/models/__pycache__/ftmlp.cpython-310.pyc and b/timm/models/__pycache__/ftmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/fullmlp.cpython-310.pyc b/timm/models/__pycache__/fullmlp.cpython-310.pyc index 5bccf50e02e6c967fe7372069a1c7e99e27c1f69..300e063a7a56a40a72384b777b79faf86f6a51e4 100644 Binary files a/timm/models/__pycache__/fullmlp.cpython-310.pyc and b/timm/models/__pycache__/fullmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/gcvit.cpython-310.pyc b/timm/models/__pycache__/gcvit.cpython-310.pyc index 304df9e9858732a412d4529b0e07bc77931d009f..1a3afb0611d1b3895ab950bca4692cce20034e37 100644 Binary files a/timm/models/__pycache__/gcvit.cpython-310.pyc and b/timm/models/__pycache__/gcvit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/ghostnet.cpython-310.pyc b/timm/models/__pycache__/ghostnet.cpython-310.pyc index 02b0195af075ac25f4390a57ae039944663ab04b..ded46c8f5e6021f4d993698bb0bc5ee96c35dc32 100644 Binary files a/timm/models/__pycache__/ghostnet.cpython-310.pyc and b/timm/models/__pycache__/ghostnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/hardcorenas.cpython-310.pyc b/timm/models/__pycache__/hardcorenas.cpython-310.pyc index af70dc7dca9cc996af39ccbdd07684a3834741e2..8a370ec6cc370c45b6f054f628a939424dd421ba 100644 Binary files a/timm/models/__pycache__/hardcorenas.cpython-310.pyc and b/timm/models/__pycache__/hardcorenas.cpython-310.pyc differ diff --git a/timm/models/__pycache__/helpers.cpython-310.pyc b/timm/models/__pycache__/helpers.cpython-310.pyc index 747948d6bc08497c2b35fd502f51a1a77652ca92..aea3d74a95b99d54e8ed3d7d79535c5ac023da7c 100644 Binary files a/timm/models/__pycache__/helpers.cpython-310.pyc and b/timm/models/__pycache__/helpers.cpython-310.pyc differ diff --git a/timm/models/__pycache__/hrnet.cpython-310.pyc b/timm/models/__pycache__/hrnet.cpython-310.pyc index 337e1a96698c97cdefa52c9096e84afd5893428b..51764aa03011444bff5f42a23621751d422b622f 100644 Binary files a/timm/models/__pycache__/hrnet.cpython-310.pyc and b/timm/models/__pycache__/hrnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/hwmlp.cpython-310.pyc b/timm/models/__pycache__/hwmlp.cpython-310.pyc index 24aba4147832fc0ff660d3ec62e99b318c535495..e3e213d44adcc8fca6fc8d994ae97f7b4581a324 100644 Binary files a/timm/models/__pycache__/hwmlp.cpython-310.pyc and b/timm/models/__pycache__/hwmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/inception_resnet_v2.cpython-310.pyc b/timm/models/__pycache__/inception_resnet_v2.cpython-310.pyc index 1fb4c3f2c288a1d2af0d63a693a40ea8e09c05d5..0695cbe9ca93067615677d1a130067f3bf0589eb 100644 Binary files a/timm/models/__pycache__/inception_resnet_v2.cpython-310.pyc and b/timm/models/__pycache__/inception_resnet_v2.cpython-310.pyc differ diff --git a/timm/models/__pycache__/inception_v3.cpython-310.pyc b/timm/models/__pycache__/inception_v3.cpython-310.pyc index cf25e1dd0de3ff6f7f4027f83fd7d27554b94102..ad422f5e2fe6308733763a31dcb04eb2e87c735d 100644 Binary files a/timm/models/__pycache__/inception_v3.cpython-310.pyc and b/timm/models/__pycache__/inception_v3.cpython-310.pyc differ diff --git a/timm/models/__pycache__/inception_v4.cpython-310.pyc b/timm/models/__pycache__/inception_v4.cpython-310.pyc index bca03a2da6c5122b162cb36cf353381a9e98c671..c257260b57704c9a122d790ab8892661eb5167e1 100644 Binary files a/timm/models/__pycache__/inception_v4.cpython-310.pyc and b/timm/models/__pycache__/inception_v4.cpython-310.pyc differ diff --git a/timm/models/__pycache__/levit.cpython-310.pyc b/timm/models/__pycache__/levit.cpython-310.pyc index a73e546f9dd1e3b062eadf100fbe15448d832892..db77d415f57b82024eec47ee6a68f8259a7dde1a 100644 Binary files a/timm/models/__pycache__/levit.cpython-310.pyc and b/timm/models/__pycache__/levit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/lipscswin.cpython-310.pyc b/timm/models/__pycache__/lipscswin.cpython-310.pyc index f8c513531181498380925e5d6b56d797e5a2f479..f1c575532b76028b0a5ec82b1d3dfee468017fe6 100644 Binary files a/timm/models/__pycache__/lipscswin.cpython-310.pyc and b/timm/models/__pycache__/lipscswin.cpython-310.pyc differ diff --git a/timm/models/__pycache__/lipscswinmlp.cpython-310.pyc b/timm/models/__pycache__/lipscswinmlp.cpython-310.pyc index adf8634cf38c84f99569351aa9190455e02864bc..cd3f3d16dd969d6c47ea9414e3af794d500a6f74 100644 Binary files a/timm/models/__pycache__/lipscswinmlp.cpython-310.pyc and b/timm/models/__pycache__/lipscswinmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/maxxvit.cpython-310.pyc b/timm/models/__pycache__/maxxvit.cpython-310.pyc index ab16b998253bff4a6fb2b827fcca44de25060bc3..4c10ce8cb5bc8b60b41a41000aa1c7980c41b6e3 100644 Binary files a/timm/models/__pycache__/maxxvit.cpython-310.pyc and b/timm/models/__pycache__/maxxvit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/metaformer.cpython-310.pyc b/timm/models/__pycache__/metaformer.cpython-310.pyc index c92180fccf9323d3d72181ef6f0aa2c4c9e594fd..c1cb2e0336266ba6a08d3ac5166d8024960e40d3 100644 Binary files a/timm/models/__pycache__/metaformer.cpython-310.pyc and b/timm/models/__pycache__/metaformer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/mlp_mixer.cpython-310.pyc b/timm/models/__pycache__/mlp_mixer.cpython-310.pyc index d8844854644a1757f84675ffa7a2a07bd1231aff..2c51ec57b9e41354c66fea5678aa3483e0dbc5c8 100644 Binary files a/timm/models/__pycache__/mlp_mixer.cpython-310.pyc and b/timm/models/__pycache__/mlp_mixer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/mobilenetv3.cpython-310.pyc b/timm/models/__pycache__/mobilenetv3.cpython-310.pyc index c96aa2a73c2bd4603e604fda49d8d1e40a2df64f..2c50a636067d9dfab9db2ac92dc26182ac5fd694 100644 Binary files a/timm/models/__pycache__/mobilenetv3.cpython-310.pyc and b/timm/models/__pycache__/mobilenetv3.cpython-310.pyc differ diff --git a/timm/models/__pycache__/mobilevit.cpython-310.pyc b/timm/models/__pycache__/mobilevit.cpython-310.pyc index a9577f20fdc334e02cd39a2ba3b43792998bad60..817089e2db8d5a7c48ecf8e31fe694f8250a9125 100644 Binary files a/timm/models/__pycache__/mobilevit.cpython-310.pyc and b/timm/models/__pycache__/mobilevit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/mvitv2.cpython-310.pyc b/timm/models/__pycache__/mvitv2.cpython-310.pyc index 3d9b93369141f805364935e1c6d7f329d71bdbed..2b0abeb0f56b92cd8c178d5e369bf5d91fcd56f0 100644 Binary files a/timm/models/__pycache__/mvitv2.cpython-310.pyc and b/timm/models/__pycache__/mvitv2.cpython-310.pyc differ diff --git a/timm/models/__pycache__/nasnet.cpython-310.pyc b/timm/models/__pycache__/nasnet.cpython-310.pyc index c05c917c4a9bf5ec85e122734a9e5696f5d52bb2..c1307930c4005550442f8f1c785ed345730c50ba 100644 Binary files a/timm/models/__pycache__/nasnet.cpython-310.pyc and b/timm/models/__pycache__/nasnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/nest.cpython-310.pyc b/timm/models/__pycache__/nest.cpython-310.pyc index 394b1e697a043214beb0e3fb75932d93612a74f2..3c0b8d5376439a5c1e268a32f2cfb009e09c8b7e 100644 Binary files a/timm/models/__pycache__/nest.cpython-310.pyc and b/timm/models/__pycache__/nest.cpython-310.pyc differ diff --git a/timm/models/__pycache__/nfnet.cpython-310.pyc b/timm/models/__pycache__/nfnet.cpython-310.pyc index 7c649d9e4bf45a7e7556fcb18772642fbceecb6f..ed701041550a24308562c6221617f668ac0190a3 100644 Binary files a/timm/models/__pycache__/nfnet.cpython-310.pyc and b/timm/models/__pycache__/nfnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/pit.cpython-310.pyc b/timm/models/__pycache__/pit.cpython-310.pyc index 058ddf736eb72b8d934cedf29c6c7dbce857ab74..6118d6f6ebfc0800af0fb59f22c8d1ce7add0ca1 100644 Binary files a/timm/models/__pycache__/pit.cpython-310.pyc and b/timm/models/__pycache__/pit.cpython-310.pyc differ diff --git a/timm/models/__pycache__/pnasnet.cpython-310.pyc b/timm/models/__pycache__/pnasnet.cpython-310.pyc index cf509617102f789d4eca4a5ba585b136033a7001..234e5e58bb75df094606993e240ebc5e27b238be 100644 Binary files a/timm/models/__pycache__/pnasnet.cpython-310.pyc and b/timm/models/__pycache__/pnasnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/pvt_v2.cpython-310.pyc b/timm/models/__pycache__/pvt_v2.cpython-310.pyc index 6c1df302fd6cb4376f5de8eec49dbc68d879e45d..63a35482459126d3643a6d5ef3e1f5ddb5de384d 100644 Binary files a/timm/models/__pycache__/pvt_v2.cpython-310.pyc and b/timm/models/__pycache__/pvt_v2.cpython-310.pyc differ diff --git a/timm/models/__pycache__/registry.cpython-310.pyc b/timm/models/__pycache__/registry.cpython-310.pyc index 633677bc8376db81edfe989a7b81b5abd8b98003..658e0815c90899eb44ced66ab8ef133fa91ac6e5 100644 Binary files a/timm/models/__pycache__/registry.cpython-310.pyc and b/timm/models/__pycache__/registry.cpython-310.pyc differ diff --git a/timm/models/__pycache__/regnet.cpython-310.pyc b/timm/models/__pycache__/regnet.cpython-310.pyc index ab65e443f26f1f314d7b408de8980255c1d1b052..bba070c5c6a345e7fba38caa32037c2b0b158b1a 100644 Binary files a/timm/models/__pycache__/regnet.cpython-310.pyc and b/timm/models/__pycache__/regnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/res2net.cpython-310.pyc b/timm/models/__pycache__/res2net.cpython-310.pyc index 1a0dcccc3efce37ce8f5099392e61faaa40485c3..db34c393f64f9f87a7aabd6f41bcdd5ec4afd35e 100644 Binary files a/timm/models/__pycache__/res2net.cpython-310.pyc and b/timm/models/__pycache__/res2net.cpython-310.pyc differ diff --git a/timm/models/__pycache__/resnest.cpython-310.pyc b/timm/models/__pycache__/resnest.cpython-310.pyc index 34c1c7ed990639f48489ca65e2ba76d1d2ab767c..794a2b912f129fc06383c96133403da9fd30b3e7 100644 Binary files a/timm/models/__pycache__/resnest.cpython-310.pyc and b/timm/models/__pycache__/resnest.cpython-310.pyc differ diff --git a/timm/models/__pycache__/resnet.cpython-310.pyc b/timm/models/__pycache__/resnet.cpython-310.pyc index 4749b38d38e1a71a3242632af3bf9ca0ec972100..cc222780f075a8e6ae933616e41af3b96ce1afe2 100644 Binary files a/timm/models/__pycache__/resnet.cpython-310.pyc and b/timm/models/__pycache__/resnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/resnetv2.cpython-310.pyc b/timm/models/__pycache__/resnetv2.cpython-310.pyc index 96ad94d41239990c6eeda8a9417cdb7cae121918..80d314fcdb303bc0c6fbe5390a763a2ba851b56a 100644 Binary files a/timm/models/__pycache__/resnetv2.cpython-310.pyc and b/timm/models/__pycache__/resnetv2.cpython-310.pyc differ diff --git a/timm/models/__pycache__/rexnet.cpython-310.pyc b/timm/models/__pycache__/rexnet.cpython-310.pyc index 049ae890ebf1b13b3551b3a9f0e37f29e1016fac..cc7939f9a80de0e6558de4fa11f353a2441f9e50 100644 Binary files a/timm/models/__pycache__/rexnet.cpython-310.pyc and b/timm/models/__pycache__/rexnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/selecsls.cpython-310.pyc b/timm/models/__pycache__/selecsls.cpython-310.pyc index 782fd8c5d29118aff95848de49027751ff767c88..427813628da0e0f2c0d96d7ee5fdf26dee518818 100644 Binary files a/timm/models/__pycache__/selecsls.cpython-310.pyc and b/timm/models/__pycache__/selecsls.cpython-310.pyc differ diff --git a/timm/models/__pycache__/senet.cpython-310.pyc b/timm/models/__pycache__/senet.cpython-310.pyc index 16fc8219f152106673b983ba0e90fd71db775115..1ec41f97bc449b17e2b0fbde55bb92f14688d43f 100644 Binary files a/timm/models/__pycache__/senet.cpython-310.pyc and b/timm/models/__pycache__/senet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/sequencer.cpython-310.pyc b/timm/models/__pycache__/sequencer.cpython-310.pyc index 59c16306a1822ea60b5c7add0d4b39074e026023..f02f0ffa243f84d177867a2035e10edea26b6d21 100644 Binary files a/timm/models/__pycache__/sequencer.cpython-310.pyc and b/timm/models/__pycache__/sequencer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/sknet.cpython-310.pyc b/timm/models/__pycache__/sknet.cpython-310.pyc index 154db582ec62f24392ada484b4c67c3aafa1417b..056a2b79c4376331be75c982043e2a02fc64c2a6 100644 Binary files a/timm/models/__pycache__/sknet.cpython-310.pyc and b/timm/models/__pycache__/sknet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/swin_transformer.cpython-310.pyc b/timm/models/__pycache__/swin_transformer.cpython-310.pyc index 430578c35e2d9f4367aafb32150b117e6304624e..c9d7094c1aaf6c3243af7d79496ad9002eb568a4 100644 Binary files a/timm/models/__pycache__/swin_transformer.cpython-310.pyc and b/timm/models/__pycache__/swin_transformer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/swin_transformer_v2.cpython-310.pyc b/timm/models/__pycache__/swin_transformer_v2.cpython-310.pyc index e1a72180f58878d60c89bbdfdcc955b41d37c7ed..7ac672e6dc5d1712628537be893f076f62710f34 100644 Binary files a/timm/models/__pycache__/swin_transformer_v2.cpython-310.pyc and b/timm/models/__pycache__/swin_transformer_v2.cpython-310.pyc differ diff --git a/timm/models/__pycache__/swin_transformer_v2_cr.cpython-310.pyc b/timm/models/__pycache__/swin_transformer_v2_cr.cpython-310.pyc index 9adadbdba8eb2e8a6d1008bf86f5b833ae593ccc..0e501c3b8206979fadde55c2564a5f7059fa246b 100644 Binary files a/timm/models/__pycache__/swin_transformer_v2_cr.cpython-310.pyc and b/timm/models/__pycache__/swin_transformer_v2_cr.cpython-310.pyc differ diff --git a/timm/models/__pycache__/tnt.cpython-310.pyc b/timm/models/__pycache__/tnt.cpython-310.pyc index b648e04c47328d6051d56e8318ddb01a25683779..06946d5f44008c91f95d65b8fd92320959fc189e 100644 Binary files a/timm/models/__pycache__/tnt.cpython-310.pyc and b/timm/models/__pycache__/tnt.cpython-310.pyc differ diff --git a/timm/models/__pycache__/tpmlp.cpython-310.pyc b/timm/models/__pycache__/tpmlp.cpython-310.pyc index 52a14f9f63992f91284914e233d4d6d1b74e92b0..b341b5e85bd1e2b660e105afddc06ef6b8cef168 100644 Binary files a/timm/models/__pycache__/tpmlp.cpython-310.pyc and b/timm/models/__pycache__/tpmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/tppmlp.cpython-310.pyc b/timm/models/__pycache__/tppmlp.cpython-310.pyc index 38587a28b69e7e2e825882d8a4344cfac1dff4dd..0bf16e3ec17ef79d4e5ef0b013ededdf2fe65659 100644 Binary files a/timm/models/__pycache__/tppmlp.cpython-310.pyc and b/timm/models/__pycache__/tppmlp.cpython-310.pyc differ diff --git a/timm/models/__pycache__/tresnet.cpython-310.pyc b/timm/models/__pycache__/tresnet.cpython-310.pyc index 1c5746034912b9c6e123d8190f3d87f5e5069320..7ef065f48afbe53d95f158455019af28389454fc 100644 Binary files a/timm/models/__pycache__/tresnet.cpython-310.pyc and b/timm/models/__pycache__/tresnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/twins.cpython-310.pyc b/timm/models/__pycache__/twins.cpython-310.pyc index 26b2e60e43bc2c8be8ab5b13f2f0f0f22219fd59..10c2ed57942cb91d869a7b245e397aa67278a677 100644 Binary files a/timm/models/__pycache__/twins.cpython-310.pyc and b/timm/models/__pycache__/twins.cpython-310.pyc differ diff --git a/timm/models/__pycache__/vgg.cpython-310.pyc b/timm/models/__pycache__/vgg.cpython-310.pyc index cc70e80604f3df8fea2bf02196e161a92b816fe6..2c3d4eea81e865efefe87e42a21bc5479b82b2ce 100644 Binary files a/timm/models/__pycache__/vgg.cpython-310.pyc and b/timm/models/__pycache__/vgg.cpython-310.pyc differ diff --git a/timm/models/__pycache__/visformer.cpython-310.pyc b/timm/models/__pycache__/visformer.cpython-310.pyc index 24cd34510f92277bb927f49695fab9e85a5b9028..fa51ee3318f9004dc94f69574afa663cefe45dbe 100644 Binary files a/timm/models/__pycache__/visformer.cpython-310.pyc and b/timm/models/__pycache__/visformer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/vision_transformer.cpython-310.pyc b/timm/models/__pycache__/vision_transformer.cpython-310.pyc index 142cff8a01f0a52ad04902bfc4d91a8da1462bdd..741a7a32d5718ce785d2c5892fad9286d818af51 100644 Binary files a/timm/models/__pycache__/vision_transformer.cpython-310.pyc and b/timm/models/__pycache__/vision_transformer.cpython-310.pyc differ diff --git a/timm/models/__pycache__/vision_transformer_hybrid.cpython-310.pyc b/timm/models/__pycache__/vision_transformer_hybrid.cpython-310.pyc index a9a5f90a6be3e9262b0d7855fda1914a02055a53..ced6555a7bf023c1a2054a5ba9935cc23f81e8dd 100644 Binary files a/timm/models/__pycache__/vision_transformer_hybrid.cpython-310.pyc and b/timm/models/__pycache__/vision_transformer_hybrid.cpython-310.pyc differ diff --git a/timm/models/__pycache__/vision_transformer_relpos.cpython-310.pyc b/timm/models/__pycache__/vision_transformer_relpos.cpython-310.pyc index 5bd31f69d450480c014d526233311de24268de01..677ff9f1ae0344ff32b65bc65ab6a01fa730c6cd 100644 Binary files a/timm/models/__pycache__/vision_transformer_relpos.cpython-310.pyc and b/timm/models/__pycache__/vision_transformer_relpos.cpython-310.pyc differ diff --git a/timm/models/__pycache__/vision_transformer_sam.cpython-310.pyc b/timm/models/__pycache__/vision_transformer_sam.cpython-310.pyc index 806f8381d6f3e85e7630e8d3bbf2b64dbf9c741e..d077fb2553628fa2c7bf086ed62710c48c973151 100644 Binary files a/timm/models/__pycache__/vision_transformer_sam.cpython-310.pyc and b/timm/models/__pycache__/vision_transformer_sam.cpython-310.pyc differ diff --git a/timm/models/__pycache__/volo.cpython-310.pyc b/timm/models/__pycache__/volo.cpython-310.pyc index 61105bef44a2452c9dd473b3e2618ecc451b9d1e..4275b56e990319f8eda3495626a61aaee190c166 100644 Binary files a/timm/models/__pycache__/volo.cpython-310.pyc and b/timm/models/__pycache__/volo.cpython-310.pyc differ diff --git a/timm/models/__pycache__/vovnet.cpython-310.pyc b/timm/models/__pycache__/vovnet.cpython-310.pyc index 7ecc6def625aa4b6de0ef79695af9bacd4492e3d..f460d1b89301fc2e544ad5153b9d604ae82a6af3 100644 Binary files a/timm/models/__pycache__/vovnet.cpython-310.pyc and b/timm/models/__pycache__/vovnet.cpython-310.pyc differ diff --git a/timm/models/__pycache__/xception.cpython-310.pyc b/timm/models/__pycache__/xception.cpython-310.pyc index 1fc3155aee4be7726c1429ae1fc6585256579cf9..3fbeb9bebabdff88e7ac667d21916f2d0823e2e5 100644 Binary files a/timm/models/__pycache__/xception.cpython-310.pyc and b/timm/models/__pycache__/xception.cpython-310.pyc differ diff --git a/timm/models/__pycache__/xception_aligned.cpython-310.pyc b/timm/models/__pycache__/xception_aligned.cpython-310.pyc index e7cb8541c5ec9a7a7f3afba1ff011590eba9d747..7a4960ddd9d16a96c35b8ea0a06f9eb0f37469bf 100644 Binary files a/timm/models/__pycache__/xception_aligned.cpython-310.pyc and b/timm/models/__pycache__/xception_aligned.cpython-310.pyc differ diff --git a/timm/models/__pycache__/xcit.cpython-310.pyc b/timm/models/__pycache__/xcit.cpython-310.pyc index 62e66474d706cbe7970a3fefe8a0e190160022ce..238acb9408888abb45260681859079325fd96b4a 100644 Binary files a/timm/models/__pycache__/xcit.cpython-310.pyc and b/timm/models/__pycache__/xcit.cpython-310.pyc differ diff --git a/timm/models/layers/__pycache__/__init__.cpython-310.pyc b/timm/models/layers/__pycache__/__init__.cpython-310.pyc index 07c7f6601e48a803bf47770e6ae324b8db1c8417..f6f0ef0876e865ba8003c46e669c69abf89fc206 100644 Binary files a/timm/models/layers/__pycache__/__init__.cpython-310.pyc and b/timm/models/layers/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/models/tppmlp.py b/timm/models/tppmlp.py index 4ca6c9b6b544bcf828f11d072485540c5c0fd724..99b8a41f5556eed55e3213c15cdc8868ae4d50d2 100644 --- a/timm/models/tppmlp.py +++ b/timm/models/tppmlp.py @@ -1,16 +1,15 @@ import torch import torch.nn as nn import torch.nn.functional as F +import torch.utils.checkpoint as checkpoint from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD from timm.models.helpers import load_pretrained from timm.models.layers import DropPath, to_2tuple, trunc_normal_ from timm.models.registry import register_model -import torch.utils.checkpoint as checkpoint -import numpy as np + from einops import rearrange from einops.layers.torch import Rearrange -from torch import einsum from einops._torch_specific import allow_ops_in_compiled_graph # requires einops>=0.6.1 allow_ops_in_compiled_graph() @@ -19,7 +18,7 @@ def _cfg(url='', **kwargs): return { 'url': url, 'num_classes': 1000, 'input_size': (3, 224, 224), 'pool_size': None, - 'crop_pct': .96, 'interpolation': 'bicubic', + 'crop_pct': .9, 'interpolation': 'bicubic', 'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD, 'classifier': 'head', **kwargs } @@ -44,252 +43,527 @@ class Mlp(nn.Module): return x -class PatchEmbed(nn.Module): - """ Image to Patch Embedding - """ - - def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768, overlap=False): - super().__init__() - if overlap: - padding = (patch_size - 1) // 2 - stride = (patch_size + 1) // 2 - else: - padding = 0 - stride = patch_size - # self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, padding=padding, stride=stride) - self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=7, padding=2, stride=4) - - def forward(self, x): - x = self.proj(x) # B, C, H, W - return x - +class Attention(nn.Module): + r""" Multi-head self attention module with dynamic position bias. -class Downsample(nn.Module): - """ Image to Patch Embedding + Args: + dim (int): Number of input channels. + group_size (tuple[int]): The height and width of the group. + num_heads (int): Number of attention heads. + qkv_bias (bool, optional): If True, add a learnable bias to query, key, value. Default: True + qk_scale (float | None, optional): Override default qk scale of head_dim ** -0.5 if set + attn_drop (float, optional): Dropout ratio of attention weight. Default: 0.0 + proj_drop (float, optional): Dropout ratio of output. Default: 0.0 """ - def __init__(self, in_embed_dim, out_embed_dim, patch_size, overlap=False): - super().__init__() - if overlap: - assert patch_size==2 - self.proj = nn.Conv2d(in_embed_dim, out_embed_dim, kernel_size=3, padding=1, stride=2) - else: - self.proj = nn.Conv2d(in_embed_dim, out_embed_dim, kernel_size=patch_size, stride=patch_size) + def __init__(self, seq_len, dim, group_size, num_heads, qkv_bias=True, qk_scale=None, attn_drop=0., proj_drop=0., + reduced_dim=2): - def forward(self, x): - x = x.permute(0, 3, 1, 2) - x = self.proj(x) # B, C, H, W - x = x.permute(0, 2, 3, 1) - return x - - -class MixingAttention(nn.Module): - def __init__(self, dim, resolution, idx, num_heads=8, split_size=2, dim_out=None, d=2, d_i=32, attn_drop=0., proj_drop=0.): super().__init__() self.dim = dim - self.dim_out = dim_out or dim + self.group_size = group_size # Wh, Ww self.num_heads = num_heads - self.resolution = resolution - self.split_size = split_size - self.d = d + self.reduced_dim = reduced_dim - if self.resolution % self.split_size != 0: - if self.resolution == 14: - self.split_size = split_size = 2 - elif self.resolution == 7: - idx = -1 + self.to_u = nn.Linear(dim, dim, bias=qkv_bias) + self.to_v = nn.Linear(dim, num_heads * reduced_dim) - if idx == -1: - H_sp, W_sp = self.resolution, self.resolution - elif idx == 0: - assert self.resolution % self.split_size == 0, f"Split size {split_size} does not divide resolution {resolution}." - H_sp, W_sp = self.resolution, self.split_size - elif idx == 1: - W_sp, H_sp = self.resolution, self.split_size - else: - print ("ERROR MODE", idx) - exit(0) - L = H_sp * W_sp - self.H_sp = H_sp - self.W_sp = W_sp - self.x_windows = self.resolution // H_sp - self.y_windows = self.resolution // W_sp - - self.proj_in = nn.Linear(dim, num_heads * d) - self.full = nn.Linear(num_heads * L * d, L * d) - self.proj_out = nn.Linear(num_heads * d, dim) + self.weight = nn.Parameter(torch.empty(num_heads, seq_len, seq_len)) + trunc_normal_(self.weight, std=.02) + self.bias = nn.Parameter(torch.zeros(num_heads, seq_len)) + + self.attn_drop = nn.Dropout(attn_drop) + self.proj = nn.Linear(dim, dim) + self.proj_drop = nn.Dropout(proj_drop) def forward(self, x): """ - x: B H W C + Args: + x: input features with shape of (num_groups*B, N, C) """ - H_sp, W_sp = self.H_sp, self.W_sp - x = self.proj_in(x) - x = rearrange(x, "b (n1 h) (n2 w) (m d) -> (b n1 n2) m (h w d)", - n1=self.x_windows, h=H_sp, n2=self.y_windows, w=W_sp, m=self.num_heads) - w = rearrange(self.full.weight, "d2 (m d1) -> m d2 d1", m=self.num_heads) - x = einsum("b m d, m f d -> b m f", x, w) + self.full.bias - x = self.proj_out(rearrange(x, "(b n1 n2) m (h w d) -> b (n1 h) (n2 w) (m d)", - n1=self.x_windows, h=H_sp, n2=self.y_windows, w=W_sp, m=self.num_heads)) + B_, N, C = x.shape + + u, v = self.to_u(x), self.to_v(x) + + # x = x.reshape(B, L, self.num_head, C//self.num_head).permute(0, 2, 3, 1) + # x = torch.matmul(x, weights) + # x: b m c//m, L + # weight: (b, m, L, L) + v = torch.matmul(rearrange(v, "b n (m d) -> b d m () n", m=self.num_heads, d=self.reduced_dim), + self.weight).squeeze(3) + self.bias + v = rearrange(v, "b m (n d) -> b n (m d)", n=N) + + x = u * v + x = self.attn_drop(x) + + # x = (attn @ v).transpose(1, 2).reshape(B_, N, C) + x = self.proj(x) + x = self.proj_drop(x) + return x + def extra_repr(self) -> str: + return f'dim={self.dim}, group_size={self.group_size}, num_heads={self.num_heads}' + + def flops(self, N): + # calculate flops for 1 group with token length of N + flops = 0 + # to_u, to_v + flops += N * self.dim * self.dim + flops += N * self.dim * (self.num_heads * self.reduced_dim) + # weight + flops += self.num_heads * (N * self.reduced_dim) * (N * self.reduced_dim) + # v_proj + flops += N * (self.num_heads * self.reduced_dim) * self.dim + # u * v + flops += N * self.dim + # proj + flops += N * self.dim * self.dim + return flops + + +class CrossFormerBlock(nn.Module): + r""" CrossFormer Block. + + Args: + dim (int): Number of input channels. + input_resolution (tuple[int]): Input resulotion. + num_heads (int): Number of attention heads. + group_size (int): Group size. + lsda_flag (int): use SDA or LDA, 0 for SDA and 1 for LDA. + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. + qkv_bias (bool, optional): If True, add a learnable bias to query, key, value. Default: True + qk_scale (float | None, optional): Override default qk scale of head_dim ** -0.5 if set. + drop (float, optional): Dropout rate. Default: 0.0 + attn_drop (float, optional): Attention dropout rate. Default: 0.0 + drop_path (float, optional): Stochastic depth rate. Default: 0.0 + act_layer (nn.Module, optional): Activation layer. Default: nn.GELU + norm_layer (nn.Module, optional): Normalization layer. Default: nn.LayerNorm + """ -class TppMLPBlock(nn.Module): - def __init__(self, dim, resolution=32, num_heads=8, reduced_dim=2, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., split_size=2): + def __init__(self, dim, input_resolution, num_heads, group_size=7, lsda_flag=0, + mlp_ratio=4., qkv_bias=True, qk_scale=None, drop=0., attn_drop=0., drop_path=0., + act_layer=nn.GELU, norm_layer=nn.LayerNorm, num_patch_size=1, reduced_dim=2): super().__init__() - self.resolution = resolution + self.dim = dim + self.input_resolution = input_resolution self.num_heads = num_heads - if resolution != 7: - self.mix_h = MixingAttention(dim, resolution // 2, idx=0, split_size=split_size, num_heads=self.num_heads, d=reduced_dim) - self.mix_w = MixingAttention(dim, resolution // 2, idx=1, split_size=split_size, num_heads=self.num_heads, d=reduced_dim) - self.mlp_c = nn.Linear(dim, dim, bias=qkv_bias) - self.reweight = Mlp(dim, dim // 4, dim * 3) - self.tp1 = Rearrange("b (h n1) (w n2) d -> (b n1 n2) h w d", n1=2, n2=2) - self.tp2 = Rearrange("(b n1 n2) h w d -> b (h n1) (w n2) d", n1=2, n2=2) - else: - self.mix_s = MixingAttention(dim, resolution, idx=-1, num_heads=self.num_heads, d=reduced_dim) - self.mlp_c = nn.Linear(dim, dim, bias=qkv_bias) - self.reweight = Mlp(dim, dim // 4, dim * 2) + self.group_size = group_size + self.lsda_flag = lsda_flag + self.mlp_ratio = mlp_ratio + self.num_patch_size = num_patch_size + if min(self.input_resolution) <= self.group_size: + # if group size is larger than input resolution, we don't partition groups + self.lsda_flag = 0 + self.group_size = min(self.input_resolution) - self.proj = nn.Linear(dim, dim) - self.proj_drop = nn.Dropout(proj_drop) - - + self.norm1 = norm_layer(dim) - def forward(self, x): - B, H, W, C = x.shape - - if self.resolution != 7: - u = self.tp1(x) - h = self.tp2(self.mix_h(u)) - w = self.tp2(self.mix_w(u)) - c = self.mlp_c(x) + self.attn = Attention( + seq_len=self.group_size ** 2, dim=dim, group_size=to_2tuple(self.group_size), + num_heads=num_heads, qkv_bias=qkv_bias, qk_scale=qk_scale, attn_drop=attn_drop, + proj_drop=drop, reduced_dim=reduced_dim) - a = (h + w + c).permute(0, 3, 1, 2).flatten(2).mean(2) - a = self.reweight(a).reshape(B, C, 3).permute(2, 0, 1).softmax(dim=0).unsqueeze(2).unsqueeze(2) + self.drop_path = DropPath(drop_path) if drop_path > 0. else nn.Identity() + self.norm2 = norm_layer(dim) + mlp_hidden_dim = int(dim * mlp_ratio) + self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop) - x = h * a[0] + w * a[1] + c * a[2] - + + def forward(self, x): + H, W = self.input_resolution + B, L, C = x.shape + assert L == H * W, "input feature has wrong size %d, %d, %d" % (L, H, W) + + shortcut = x + x = self.norm1(x) + x = x.view(B, H, W, C) + + # group embeddings + G = self.group_size + if self.lsda_flag == 0: # 0 for SDA + x = x.reshape(B, H // G, G, W // G, G, C).permute(0, 1, 3, 2, 4, 5) + else: # 1 for LDA + x = x.reshape(B, G, H // G, G, W // G, C).permute(0, 2, 4, 1, 3, 5) + x = x.reshape(B * H * W // G**2, G**2, C) + + # multi-head self-attention + x = self.attn(x) # nW*B, G*G, C + + # ungroup embeddings + x = x.reshape(B, H // G, W // G, G, G, C) + if self.lsda_flag == 0: + x = x.permute(0, 1, 3, 2, 4, 5).reshape(B, H, W, C) else: - s = self.mix_s(x) - c = self.mlp_c(x) - - a = (s + c).permute(0, 3, 1, 2).flatten(2).mean(2) - a = self.reweight(a).reshape(B, C, 2).permute(2, 0, 1).softmax(dim=0).unsqueeze(2).unsqueeze(2) - - x = s * a[0] + c * a[1] + x = x.permute(0, 3, 1, 4, 2, 5).reshape(B, H, W, C) + x = x.view(B, H * W, C) - x = self.proj(x) - x = self.proj_drop(x) + # FFN + x = shortcut + self.drop_path(x) + x = x + self.drop_path(self.mlp(self.norm2(x))) return x + def extra_repr(self) -> str: + return f"dim={self.dim}, input_resolution={self.input_resolution}, num_heads={self.num_heads}, " \ + f"group_size={self.group_size}, lsda_flag={self.lsda_flag}, mlp_ratio={self.mlp_ratio}" + + def flops(self): + flops = 0 + H, W = self.input_resolution + # norm1 + flops += self.dim * H * W + # LSDA + nW = H * W / self.group_size / self.group_size + flops += nW * self.attn.flops(self.group_size * self.group_size) + # mlp + flops += 2 * H * W * self.dim * self.dim * self.mlp_ratio + # norm2 + flops += self.dim * H * W + return flops + +class PatchMerging(nn.Module): + r""" Patch Merging Layer. + + Args: + input_resolution (tuple[int]): Resolution of input feature. + dim (int): Number of input channels. + norm_layer (nn.Module, optional): Normalization layer. Default: nn.LayerNorm + """ -class VisionBlock(nn.Module): - - def __init__(self, dim, resolution, num_head, reduced_dim, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., - drop_path=0., act_layer=nn.GELU, norm_layer=nn.LayerNorm, skip_lam=1.0, mlp_fn=TppMLPBlock, split_size=2): + def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm, patch_size=[2], num_input_patch_size=1): super().__init__() - self.norm1 = norm_layer(dim) - self.attn = mlp_fn(dim, resolution=resolution, num_heads=num_head, reduced_dim=reduced_dim, qkv_bias=qkv_bias, qk_scale=None, - attn_drop=attn_drop, split_size=split_size) + self.input_resolution = input_resolution + self.dim = dim + self.reductions = nn.ModuleList() + self.patch_size = patch_size + self.norm = norm_layer(dim) + + for i, ps in enumerate(patch_size): + if i == len(patch_size) - 1: + out_dim = 2 * dim // 2 ** i + else: + out_dim = 2 * dim // 2 ** (i + 1) + stride = 2 + padding = (ps - stride) // 2 + self.reductions.append(nn.Conv2d(dim, out_dim, kernel_size=ps, + stride=stride, padding=padding)) - # NOTE: drop path for stochastic depth, we shall see if this is better than dropout here - self.drop_path = DropPath(drop_path) if drop_path > 0. else nn.Identity() + def forward(self, x): + """ + x: B, H*W, C + """ + H, W = self.input_resolution + B, L, C = x.shape + assert L == H * W, "input feature has wrong size" + assert H % 2 == 0 and W % 2 == 0, f"x size ({H}*{W}) are not even." - self.norm2 = norm_layer(dim) - mlp_hidden_dim = int(dim * mlp_ratio) - self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer) - self.skip_lam = skip_lam + x = self.norm(x) + x = x.view(B, H, W, C).permute(0, 3, 1, 2) - def forward(self, x): - x = x + self.drop_path(self.attn(self.norm1(x))) / self.skip_lam - x = x + self.drop_path(self.mlp(self.norm2(x))) / self.skip_lam + xs = [] + for i in range(len(self.reductions)): + tmp_x = self.reductions[i](x).flatten(2).transpose(1, 2) + xs.append(tmp_x) + x = torch.cat(xs, dim=2) return x + def extra_repr(self) -> str: + return f"input_resolution={self.input_resolution}, dim={self.dim}" + + def flops(self): + H, W = self.input_resolution + flops = H * W * self.dim + for i, ps in enumerate(self.patch_size): + if i == len(self.patch_size) - 1: + out_dim = 2 * self.dim // 2 ** i + else: + out_dim = 2 * self.dim // 2 ** (i + 1) + flops += (H // 2) * (W // 2) * ps * ps * out_dim * self.dim + return flops + + +class Stage(nn.Module): + """ CrossFormer blocks for one stage. + + Args: + dim (int): Number of input channels. + input_resolution (tuple[int]): Input resolution. + depth (int): Number of blocks. + num_heads (int): Number of attention heads. + group_size (int): variable G in the paper, one group has GxG embeddings + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. + qkv_bias (bool, optional): If True, add a learnable bias to query, key, value. Default: True + qk_scale (float | None, optional): Override default qk scale of head_dim ** -0.5 if set. + drop (float, optional): Dropout rate. Default: 0.0 + attn_drop (float, optional): Attention dropout rate. Default: 0.0 + drop_path (float | tuple[float], optional): Stochastic depth rate. Default: 0.0 + norm_layer (nn.Module, optional): Normalization layer. Default: nn.LayerNorm + downsample (nn.Module | None, optional): Downsample layer at the end of the layer. Default: None + use_checkpoint (bool): Whether to use checkpointing to save memory. Default: False. + """ -def basic_blocks(dim, index, layers, resolution, num_head, reduced_dim, mlp_ratio=3., qkv_bias=False, qk_scale=None, \ - attn_drop=0, drop_path_rate=0., skip_lam=1.0, mlp_fn=TppMLPBlock, split_size=2, **kwargs): - blocks = [] + def __init__(self, dim, input_resolution, depth, num_heads, group_size, + mlp_ratio=4., qkv_bias=True, qk_scale=None, drop=0., attn_drop=0., + drop_path=0., norm_layer=nn.LayerNorm, downsample=None, use_checkpoint=False, + patch_size_end=[4], num_patch_size=None, reduced_dim=2): - for block_idx in range(layers[index]): - block_dpr = drop_path_rate * (block_idx + sum(layers[:index])) / (sum(layers) - 1) - blocks.append(VisionBlock(dim, resolution, num_head, reduced_dim, mlp_ratio=mlp_ratio, qkv_bias=qkv_bias, qk_scale=qk_scale, \ - attn_drop=attn_drop, drop_path=block_dpr, skip_lam=skip_lam, mlp_fn=mlp_fn, split_size=split_size)) + super().__init__() + self.dim = dim + self.input_resolution = input_resolution + self.depth = depth + self.use_checkpoint = use_checkpoint + + # build blocks + self.blocks = nn.ModuleList() + for i in range(depth): + lsda_flag = 0 if (i % 2 == 0) else 1 + self.blocks.append(CrossFormerBlock(dim=dim, input_resolution=input_resolution, + num_heads=num_heads, group_size=group_size, + lsda_flag=lsda_flag, + mlp_ratio=mlp_ratio, + qkv_bias=qkv_bias, qk_scale=qk_scale, + drop=drop, attn_drop=attn_drop, + drop_path=drop_path[i] if isinstance(drop_path, list) else drop_path, + norm_layer=norm_layer, + num_patch_size=num_patch_size, + reduced_dim=reduced_dim)) + + # patch merging layer + if downsample is not None: + self.downsample = downsample(input_resolution, dim=dim, norm_layer=norm_layer, + patch_size=patch_size_end, num_input_patch_size=num_patch_size) + else: + self.downsample = None - blocks = nn.Sequential(*blocks) + def forward(self, x): + for blk in self.blocks: + if self.use_checkpoint: + x = checkpoint.checkpoint(blk, x) + else: + x = blk(x) + if self.downsample is not None: + x = self.downsample(x) + return x - return blocks + def extra_repr(self) -> str: + return f"dim={self.dim}, input_resolution={self.input_resolution}, depth={self.depth}" + def flops(self): + flops = 0 + for blk in self.blocks: + flops += blk.flops() + if self.downsample is not None: + flops += self.downsample.flops() + return flops -class VisionModel(nn.Module): - def __init__(self, layers, img_size=224, patch_size=4, in_chans=3, num_classes=1000, embed_dims=None, - transitions=None, resolutions=None, num_heads=None, reduced_dims=None, mlp_ratios=None, skip_lam=1.0, - qkv_bias=False, qk_scale=None, drop_rate=0., attn_drop_rate=0., drop_path_rate=0., - norm_layer=nn.LayerNorm, mlp_fn=TppMLPBlock, overlap=False, split_size=2, **kwargs): +class PatchEmbed(nn.Module): + r""" Image to Patch Embedding + + Args: + img_size (int): Image size. Default: 224. + patch_size (int): Patch token size. Default: [4]. + in_chans (int): Number of input image channels. Default: 3. + embed_dim (int): Number of linear projection output channels. Default: 96. + norm_layer (nn.Module, optional): Normalization layer. Default: None + """ + def __init__(self, img_size=224, patch_size=[4], in_chans=3, embed_dim=96, norm_layer=None): super().__init__() - self.num_classes = num_classes + img_size = to_2tuple(img_size) + # patch_size = to_2tuple(patch_size) + patches_resolution = [img_size[0] // patch_size[0], img_size[0] // patch_size[0]] + self.img_size = img_size + self.patch_size = patch_size + self.patches_resolution = patches_resolution + self.num_patches = patches_resolution[0] * patches_resolution[1] + + self.in_chans = in_chans + self.embed_dim = embed_dim + + self.projs = nn.ModuleList() + for i, ps in enumerate(patch_size): + if i == len(patch_size) - 1: + dim = embed_dim // 2 ** i + else: + dim = embed_dim // 2 ** (i + 1) + stride = patch_size[0] + padding = (ps - patch_size[0]) // 2 + self.projs.append(nn.Conv2d(in_chans, dim, kernel_size=ps, stride=stride, padding=padding)) + if norm_layer is not None: + self.norm = norm_layer(embed_dim) + else: + self.norm = None - self.patch_embed = PatchEmbed(img_size=img_size, patch_size=patch_size, in_chans=in_chans, - embed_dim=embed_dims[0], overlap=overlap) + def forward(self, x): + B, C, H, W = x.shape + # FIXME look at relaxing size constraints + assert H == self.img_size[0] and W == self.img_size[1], \ + f"Input image size ({H}*{W}) doesn't match model ({self.img_size[0]}*{self.img_size[1]})." + xs = [] + for i in range(len(self.projs)): + tx = self.projs[i](x).flatten(2).transpose(1, 2) + xs.append(tx) # B Ph*Pw C + x = torch.cat(xs, dim=2) + if self.norm is not None: + x = self.norm(x) + return x - network = [] - for i in range(len(layers)): - stage = basic_blocks(embed_dims[i], i, layers, resolutions[i], num_heads[i], reduced_dims[i], - mlp_ratio=mlp_ratios[i], qkv_bias=qkv_bias, qk_scale=qk_scale, attn_drop=attn_drop_rate, - drop_path_rate=drop_path_rate, norm_layer=norm_layer, skip_lam=skip_lam, mlp_fn=mlp_fn, split_size=split_size) - network.append(stage) - if i >= len(layers) - 1: - break - if transitions[i] or embed_dims[i] != embed_dims[i + 1]: - patch_size = 2 if transitions[i] else 1 - network.append(Downsample(embed_dims[i], embed_dims[i + 1], patch_size, overlap=overlap)) + def flops(self): + Ho, Wo = self.patches_resolution + flops = 0 + for i, ps in enumerate(self.patch_size): + if i == len(self.patch_size) - 1: + dim = self.embed_dim // 2 ** i + else: + dim = self.embed_dim // 2 ** (i + 1) + flops += Ho * Wo * dim * self.in_chans * (self.patch_size[i] * self.patch_size[i]) + if self.norm is not None: + flops += Ho * Wo * self.embed_dim + return flops + + +class CrossFormer(nn.Module): + r""" CrossFormer + A PyTorch impl of : `CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention` - + + Args: + img_size (int | tuple(int)): Input image size. Default 224 + patch_size (int | tuple(int)): Patch size. Default: 4 + in_chans (int): Number of input image channels. Default: 3 + num_classes (int): Number of classes for classification head. Default: 1000 + embed_dim (int): Patch embedding dimension. Default: 96 + depths (tuple(int)): Depth of each stage. + num_heads (tuple(int)): Number of attention heads in different layers. + group_size (int): Group size. Default: 7 + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4 + qkv_bias (bool): If True, add a learnable bias to query, key, value. Default: True + qk_scale (float): Override default qk scale of head_dim ** -0.5 if set. Default: None + drop_rate (float): Dropout rate. Default: 0 + attn_drop_rate (float): Attention dropout rate. Default: 0 + drop_path_rate (float): Stochastic depth rate. Default: 0.1 + norm_layer (nn.Module): Normalization layer. Default: nn.LayerNorm. + ape (bool): If True, add absolute position embedding to the patch embedding. Default: False + patch_norm (bool): If True, add normalization after patch embedding. Default: True + use_checkpoint (bool): Whether to use checkpointing to save memory. Default: False + """ - self.network = nn.ModuleList(network) + def __init__(self, img_size=224, patch_size=[4], in_chans=3, num_classes=1000, + embed_dim=96, depths=[2, 2, 6, 2], num_heads=[3, 6, 12, 24], + group_size=7, mlp_ratio=4., qkv_bias=True, qk_scale=None, + drop_rate=0., attn_drop_rate=0., drop_path_rate=0.1, + norm_layer=nn.LayerNorm, ape=False, patch_norm=True, + use_checkpoint=False, merge_size=[[2], [2], [2]], + reduced_dims=[2, 2, 2, 2], **kwargs): + super().__init__() - self.norm = norm_layer(embed_dims[-1]) + self.num_classes = num_classes + self.num_layers = len(depths) + self.embed_dim = embed_dim + self.ape = ape + self.patch_norm = patch_norm + self.num_features = int(embed_dim * 2 ** (self.num_layers - 1)) + self.mlp_ratio = mlp_ratio + + # split image into non-overlapping patches + self.patch_embed = PatchEmbed( + img_size=img_size, patch_size=patch_size, in_chans=in_chans, embed_dim=embed_dim, + norm_layer=norm_layer if self.patch_norm else None) + num_patches = self.patch_embed.num_patches + patches_resolution = self.patch_embed.patches_resolution + self.patches_resolution = patches_resolution + + # absolute position embedding + if self.ape: + self.absolute_pos_embed = nn.Parameter(torch.zeros(1, num_patches, embed_dim)) + trunc_normal_(self.absolute_pos_embed, std=.02) + + self.pos_drop = nn.Dropout(p=drop_rate) + + # stochastic depth + dpr = [x.item() for x in torch.linspace(0, drop_path_rate, sum(depths))] # stochastic depth decay rule + + # build layers + self.layers = nn.ModuleList() + + num_patch_sizes = [len(patch_size)] + [len(m) for m in merge_size] + for i_layer in range(self.num_layers): + patch_size_end = merge_size[i_layer] if i_layer < self.num_layers - 1 else None + num_patch_size = num_patch_sizes[i_layer] + layer = Stage(dim=int(embed_dim * 2 ** i_layer), + input_resolution=(patches_resolution[0] // (2 ** i_layer), + patches_resolution[1] // (2 ** i_layer)), + depth=depths[i_layer], + num_heads=num_heads[i_layer], + group_size=group_size[i_layer], + mlp_ratio=self.mlp_ratio, + qkv_bias=qkv_bias, qk_scale=qk_scale, + drop=drop_rate, attn_drop=attn_drop_rate, + drop_path=dpr[sum(depths[:i_layer]):sum(depths[:i_layer + 1])], + norm_layer=norm_layer, + downsample=PatchMerging if (i_layer < self.num_layers - 1) else None, + use_checkpoint=use_checkpoint, + patch_size_end=patch_size_end, + num_patch_size=num_patch_size, + reduced_dim=reduced_dims[i_layer]) + self.layers.append(layer) + + self.norm = norm_layer(self.num_features) + self.avgpool = nn.AdaptiveAvgPool1d(1) + self.head = nn.Linear(self.num_features, num_classes) if num_classes > 0 else nn.Identity() - # Classifier head - self.head = nn.Linear(embed_dims[-1], num_classes) if num_classes > 0 else nn.Identity() self.apply(self._init_weights) - def _init_weights(self, m): + def _init_weights(self, m, init_eps=1e-3): if isinstance(m, nn.Linear): - trunc_normal_(m.weight, std=.02) - if isinstance(m, nn.Linear) and m.bias is not None: - nn.init.constant_(m.bias, 0) + if hasattr(m, "stable") and m.stable: + # print("Stable init.") + nn.init.uniform_(m.weight, -init_eps/m.seq_len, init_eps/m.seq_len) + nn.init.constant_(m.bias, 1) + else: + trunc_normal_(m.weight, std=.02) + if isinstance(m, nn.Linear) and m.bias is not None: + nn.init.constant_(m.bias, 0) elif isinstance(m, nn.LayerNorm): nn.init.constant_(m.bias, 0) nn.init.constant_(m.weight, 1.0) - def get_classifier(self): - return self.head + @torch.jit.ignore + def no_weight_decay(self): + return {'absolute_pos_embed'} - def reset_classifier(self, num_classes, global_pool=''): - self.num_classes = num_classes - self.head = nn.Linear(self.embed_dim, num_classes) if num_classes > 0 else nn.Identity() + @torch.jit.ignore + def no_weight_decay_keywords(self): + return {'relative_position_bias_table'} - def forward_embeddings(self, x): + def forward_features(self, x): x = self.patch_embed(x) - # B,C,H,W-> B,H,W,C - x = x.permute(0, 2, 3, 1) - return x + if self.ape: + x = x + self.absolute_pos_embed + x = self.pos_drop(x) + + for layer in self.layers: + x = layer(x) - def forward_tokens(self, x): - for idx, block in enumerate(self.network): - x = block(x) - B, H, W, C = x.shape - x = x.reshape(B, -1, C) + x = self.norm(x) # B L C + x = self.avgpool(x.transpose(1, 2)) # B C 1 + x = torch.flatten(x, 1) return x def forward(self, x): - x = self.forward_embeddings(x) - # B, H, W, C -> B, N, C - x = self.forward_tokens(x) - x = self.norm(x) - return self.head(x.mean(1)) + x = self.forward_features(x) + x = self.head(x) + return x + + def flops(self): + flops = 0 + flops += self.patch_embed.flops() + for i, layer in enumerate(self.layers): + flops += layer.flops() + flops += self.num_features * self.patches_resolution[0] * self.patches_resolution[1] // (2 ** self.num_layers) + flops += self.num_features * self.num_classes + return flops default_cfgs = { @@ -298,70 +572,34 @@ default_cfgs = { 'TppMLP_L': _cfg(crop_pct=0.875), } - @register_model def tppmlp_t(pretrained=False, **kwargs): - layers = [2, 3, 10, 3] - transitions = [True, True, True, False] - resolutions = [56, 28, 14, 7] - num_heads = [8, 16, 16, 16] - mlp_ratios = [4, 4, 4, 4] - embed_dims = [64, 128, 320, 512] - reduced_dims = [2, 4, 4, 8] - split_size = 4 - model = VisionModel(layers, embed_dims=embed_dims, patch_size=7, transitions=transitions, - resolutions=resolutions, num_heads=num_heads, reduced_dims=reduced_dims, mlp_ratios=mlp_ratios, - mlp_fn=TppMLPBlock, split_size=split_size, **kwargs) - model.default_cfg = default_cfgs['TppMLP_S'] + model = CrossFormer(embed_dim=64, depths=[1, 1, 8, 6], num_heads=[2, 4, 8, 16], group_size=[7, 7, 7, 7], + patch_size=[4, 8, 16, 32], merge_size=[[2, 4], [2, 4], [2, 4]], drop_path_rate=0.1, + reduced_dims=[2, 2, 2, 2], **kwargs) + model.default_cfg = default_cfgs['TppMLP_L'] return model - @register_model def tppmlp_s(pretrained=False, **kwargs): - layers = [3, 4, 18, 3] - transitions = [True, True, True, False] - resolutions = [56, 28, 14, 7] - num_heads = [8, 16, 16, 16] - mlp_ratios = [8, 8, 4, 4] - embed_dims = [64, 128, 320, 512] - reduced_dims = [2, 4, 4, 8] - split_size = 4 - model = VisionModel(layers, embed_dims=embed_dims, patch_size=7, transitions=transitions, - resolutions=resolutions, num_heads=num_heads, reduced_dims=reduced_dims, mlp_ratios=mlp_ratios, - mlp_fn=TppMLPBlock, split_size=split_size, **kwargs) - model.default_cfg = default_cfgs['TppMLP_S'] + model = CrossFormer(embed_dim=96, depths=[2, 2, 6, 2], num_heads=[3, 6, 12, 24], group_size=[7, 7, 7, 7], + patch_size=[4, 8, 16, 32], merge_size=[[2, 4], [2, 4], [2, 4]], drop_path_rate=0.2, + reduced_dims=[4, 4, 4, 4], **kwargs) + model.default_cfg = default_cfgs['TppMLP_L'] return model - @register_model def tppmlp_b(pretrained=False, **kwargs): - layers = [3, 8, 27, 3] - transitions = [True, True, True, False] - resolutions = [56, 28, 14, 7] - num_heads = [8, 8, 16, 16] - mlp_ratios = [8, 8, 4, 4] - embed_dims = [64, 128, 320, 512] - reduced_dims = [2, 4, 4, 8] - split_size = 4 - model = VisionModel(layers, embed_dims=embed_dims, patch_size=7, transitions=transitions, - resolutions=resolutions, num_heads=num_heads, reduced_dims=reduced_dims, mlp_ratios=mlp_ratios, - mlp_fn=TppMLPBlock, split_size=split_size, **kwargs) - model.default_cfg = default_cfgs['TppMLP_M'] + model = CrossFormer(embed_dim=96, depths=[2, 2, 18, 2], num_heads=[3, 6, 12, 24], group_size=[7, 7, 7, 7], + patch_size=[4, 8, 16, 32], merge_size=[[2, 4], [2, 4], [2, 4]], drop_path_rate=0.3, + reduced_dims=[4, 4, 4, 4], **kwargs) + model.default_cfg = default_cfgs['TppMLP_L'] return model - @register_model def tppmlp_l(pretrained=False, **kwargs): - layers = [3, 4, 24, 3] - transitions = [True, True, True, False] - resolutions = [56, 28, 14, 7] - num_heads = [8, 16, 16, 16] - mlp_ratios = [4, 4, 4, 4] - embed_dims = [96, 192, 384, 768] - reduced_dims = [2, 4, 4, 8] - split_size = 4 - model = VisionModel(layers, embed_dims=embed_dims, patch_size=7, transitions=transitions, - resolutions=resolutions, num_heads=num_heads, reduced_dims=reduced_dims, mlp_ratios=mlp_ratios, - mlp_fn=TppMLPBlock, split_size=split_size, **kwargs) + model = CrossFormer(embed_dim=128, depths=[2, 2, 18, 2], num_heads=[4, 8, 16, 32], group_size=[7, 7, 7, 7], + patch_size=[4, 8, 16, 32], merge_size=[[2, 4], [2, 4], [2, 4]], drop_path_rate=0.5, + reduced_dims=[4, 4, 4, 4], **kwargs) model.default_cfg = default_cfgs['TppMLP_L'] return model diff --git a/timm/utils/__pycache__/__init__.cpython-310.pyc b/timm/utils/__pycache__/__init__.cpython-310.pyc index 78dcab7865658424472b329f1b6713d12cc2f7f0..fc6727966214e9a712fcbafda5ce3864205fda53 100644 Binary files a/timm/utils/__pycache__/__init__.cpython-310.pyc and b/timm/utils/__pycache__/__init__.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/agc.cpython-310.pyc b/timm/utils/__pycache__/agc.cpython-310.pyc index 8032e465264c9c0fc5e5070e30ae270ac9f2ea84..fe3ed78eaadd14bb2892b81d0bfdb0daa76be13f 100644 Binary files a/timm/utils/__pycache__/agc.cpython-310.pyc and b/timm/utils/__pycache__/agc.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/checkpoint_saver.cpython-310.pyc b/timm/utils/__pycache__/checkpoint_saver.cpython-310.pyc index 2ed0b5ed0555cf0e09c7d3febfd52fd63f291a32..9bb2d61838ed7d564faac8a812736aecda1bd4a8 100644 Binary files a/timm/utils/__pycache__/checkpoint_saver.cpython-310.pyc and b/timm/utils/__pycache__/checkpoint_saver.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/clip_grad.cpython-310.pyc b/timm/utils/__pycache__/clip_grad.cpython-310.pyc index 7ad0dc1a03d308c841c75a709ebcd3ad5b53d8b3..fd2be9b9e6b18068cbed4735268dc99df4be262b 100644 Binary files a/timm/utils/__pycache__/clip_grad.cpython-310.pyc and b/timm/utils/__pycache__/clip_grad.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/cuda.cpython-310.pyc b/timm/utils/__pycache__/cuda.cpython-310.pyc index 9db0c77875ca066ac479b33418915e8a13a3182c..ad7531e9ac1d722ba20e93f8ce1e0fe7136bbf72 100644 Binary files a/timm/utils/__pycache__/cuda.cpython-310.pyc and b/timm/utils/__pycache__/cuda.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/decay_batch.cpython-310.pyc b/timm/utils/__pycache__/decay_batch.cpython-310.pyc index 62b383cd76a809853eb51ffffc88df3f302217f9..4b81b4aa4783c4ea165ff71660f3925e347cf4e7 100644 Binary files a/timm/utils/__pycache__/decay_batch.cpython-310.pyc and b/timm/utils/__pycache__/decay_batch.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/distributed.cpython-310.pyc b/timm/utils/__pycache__/distributed.cpython-310.pyc index 5efe0d65798fa9cd1daa0826775d61a4daa0cc2a..c9d35418db19edef2100639bb0cf408a52721355 100644 Binary files a/timm/utils/__pycache__/distributed.cpython-310.pyc and b/timm/utils/__pycache__/distributed.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/jit.cpython-310.pyc b/timm/utils/__pycache__/jit.cpython-310.pyc index 5a17d4f86566c700bbfd04e6ac9706fe027dbed5..5cc624bee3d63ec1b154356a8b6a6b89f984d442 100644 Binary files a/timm/utils/__pycache__/jit.cpython-310.pyc and b/timm/utils/__pycache__/jit.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/log.cpython-310.pyc b/timm/utils/__pycache__/log.cpython-310.pyc index 29f639c0b41a195ec28d22b8c4622d084485a6bd..e64c7b90102082aa3494053c53316bc0a04a9a24 100644 Binary files a/timm/utils/__pycache__/log.cpython-310.pyc and b/timm/utils/__pycache__/log.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/metrics.cpython-310.pyc b/timm/utils/__pycache__/metrics.cpython-310.pyc index 6d0aed653a5c3e6bf382ac4235637d91142b8e3d..b04029c2dc0c5f81600dece7a443be7c494719e1 100644 Binary files a/timm/utils/__pycache__/metrics.cpython-310.pyc and b/timm/utils/__pycache__/metrics.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/misc.cpython-310.pyc b/timm/utils/__pycache__/misc.cpython-310.pyc index b0868fc13aabafcdd28a79ddb30e4cbb4daeccac..067637483391387640dd88109c98a712f4bec3f7 100644 Binary files a/timm/utils/__pycache__/misc.cpython-310.pyc and b/timm/utils/__pycache__/misc.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/model.cpython-310.pyc b/timm/utils/__pycache__/model.cpython-310.pyc index 16f919af8782e6bf9df27347eca0fee6ee902210..5360d50f5ca59cc715024cae3bfe0d2d32110b51 100644 Binary files a/timm/utils/__pycache__/model.cpython-310.pyc and b/timm/utils/__pycache__/model.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/model_ema.cpython-310.pyc b/timm/utils/__pycache__/model_ema.cpython-310.pyc index ecdaef81441e50f952d36d030115b2416359e83f..a37b87a2068c897c699ee7dc8c3681c98b8cbbe2 100644 Binary files a/timm/utils/__pycache__/model_ema.cpython-310.pyc and b/timm/utils/__pycache__/model_ema.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/random.cpython-310.pyc b/timm/utils/__pycache__/random.cpython-310.pyc index d1709ee01001c2d2ccac7c49a45219217476e01e..11e0999a559b4e5688d7279a8c6effc86727db0f 100644 Binary files a/timm/utils/__pycache__/random.cpython-310.pyc and b/timm/utils/__pycache__/random.cpython-310.pyc differ diff --git a/timm/utils/__pycache__/summary.cpython-310.pyc b/timm/utils/__pycache__/summary.cpython-310.pyc index 754f2eeb9060a273db91987e614795c22d464b70..458ae1839f6fdf9a55a7d9f695b4f81a6d4853af 100644 Binary files a/timm/utils/__pycache__/summary.cpython-310.pyc and b/timm/utils/__pycache__/summary.cpython-310.pyc differ