├── .gitignore ├── LICENSE ├── data_provider ├── data_factory.py ├── data_loader.py └── m4.py ├── exp ├── __init__.py ├── exp_basic.py └── exp_main.py ├── models ├── __init__.py ├── decomposition.py ├── model.py └── wavelet_patch_mixer.py ├── pytorch_wavelets ├── LICENSE ├── __init__.py ├── _version.py ├── dtcwt │ ├── __init__.py │ ├── coeffs.py │ ├── data │ │ ├── __init__.py │ │ ├── antonini.npz │ │ ├── farras.npz │ │ ├── legall.npz │ │ ├── near_sym_a.npz │ │ ├── near_sym_a2.npz │ │ ├── near_sym_b.npz │ │ ├── near_sym_b_bp.npz │ │ ├── qshift_06.npz │ │ ├── qshift_32.npz │ │ ├── qshift_a.npz │ │ ├── qshift_b.npz │ │ ├── qshift_b_bp.npz │ │ ├── qshift_c.npz │ │ └── qshift_d.npz │ ├── lowlevel.py │ ├── lowlevel2.py │ ├── transform2d.py │ └── transform_funcs.py ├── dwt │ ├── __init__.py │ ├── lowlevel.py │ ├── swt_inverse.py │ ├── transform1d.py │ └── transform2d.py ├── remarks.txt ├── scatternet │ ├── __init__.py │ ├── layers.py │ └── lowlevel.py └── utils.py ├── readme.md ├── requirements.txt ├── run_LTF.py ├── scripts ├── Full_HyperSearch │ ├── ETTh1_full_hyp.sh │ ├── ETTh2_full_hyp.sh │ ├── ETTm1_full_hyp.sh │ ├── ETTm2_full_hyp.sh │ ├── Electricity_full_hyp.sh │ ├── Traffic_full_hyp.sh │ └── Weather_full_hyp.sh ├── HyperParameter_Tuning │ ├── ETT_optuna_unified.sh │ └── readme.md ├── Model_architecture.png ├── Multivariate_long_term_result.png ├── Multivariate_long_term_result_unified_setting.png ├── Unified │ ├── ETTh1_Unified_setup.sh │ ├── ETTh2_Unified_setup.sh │ ├── ETTm1_Unified_setup.sh │ ├── ETTm2_Unified_setup.sh │ ├── Electricity_Unified_setup.sh │ ├── Traffic_Unified_setup.sh │ └── Weather_Unified_setup.sh ├── Univariate │ ├── ETTh1_univariate.sh │ ├── ETTh2_univariate.sh │ ├── ETTm1_univariate.sh │ └── ETTm2_univariate.sh ├── Univariate_long_term_result.png └── data_tree.png └── utils ├── RevIN.py ├── Tuner.py ├── __init__.py ├── losses.py ├── m4_summary.py ├── metrics.py ├── output_database.py ├── timefeatures.py └── tools.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/LICENSE -------------------------------------------------------------------------------- /data_provider/data_factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/data_provider/data_factory.py -------------------------------------------------------------------------------- /data_provider/data_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/data_provider/data_loader.py -------------------------------------------------------------------------------- /data_provider/m4.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/data_provider/m4.py -------------------------------------------------------------------------------- /exp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exp/exp_basic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/exp/exp_basic.py -------------------------------------------------------------------------------- /exp/exp_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/exp/exp_main.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/decomposition.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/models/decomposition.py -------------------------------------------------------------------------------- /models/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/models/model.py -------------------------------------------------------------------------------- /models/wavelet_patch_mixer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/models/wavelet_patch_mixer.py -------------------------------------------------------------------------------- /pytorch_wavelets/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/LICENSE -------------------------------------------------------------------------------- /pytorch_wavelets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/__init__.py -------------------------------------------------------------------------------- /pytorch_wavelets/_version.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/_version.py -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/__init__.py -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/coeffs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/coeffs.py -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/antonini.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/antonini.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/farras.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/farras.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/legall.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/legall.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/near_sym_a.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/near_sym_a.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/near_sym_a2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/near_sym_a2.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/near_sym_b.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/near_sym_b.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/near_sym_b_bp.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/near_sym_b_bp.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_06.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_06.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_32.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_32.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_a.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_a.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_b.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_b.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_b_bp.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_b_bp.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_c.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_c.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/data/qshift_d.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/data/qshift_d.npz -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/lowlevel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/lowlevel.py -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/lowlevel2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/lowlevel2.py -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/transform2d.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/transform2d.py -------------------------------------------------------------------------------- /pytorch_wavelets/dtcwt/transform_funcs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dtcwt/transform_funcs.py -------------------------------------------------------------------------------- /pytorch_wavelets/dwt/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pytorch_wavelets/dwt/lowlevel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dwt/lowlevel.py -------------------------------------------------------------------------------- /pytorch_wavelets/dwt/swt_inverse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dwt/swt_inverse.py -------------------------------------------------------------------------------- /pytorch_wavelets/dwt/transform1d.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dwt/transform1d.py -------------------------------------------------------------------------------- /pytorch_wavelets/dwt/transform2d.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/dwt/transform2d.py -------------------------------------------------------------------------------- /pytorch_wavelets/remarks.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/remarks.txt -------------------------------------------------------------------------------- /pytorch_wavelets/scatternet/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/scatternet/__init__.py -------------------------------------------------------------------------------- /pytorch_wavelets/scatternet/layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/scatternet/layers.py -------------------------------------------------------------------------------- /pytorch_wavelets/scatternet/lowlevel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/scatternet/lowlevel.py -------------------------------------------------------------------------------- /pytorch_wavelets/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/pytorch_wavelets/utils.py -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/readme.md -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/requirements.txt -------------------------------------------------------------------------------- /run_LTF.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/run_LTF.py -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/ETTh1_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/ETTh1_full_hyp.sh -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/ETTh2_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/ETTh2_full_hyp.sh -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/ETTm1_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/ETTm1_full_hyp.sh -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/ETTm2_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/ETTm2_full_hyp.sh -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/Electricity_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/Electricity_full_hyp.sh -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/Traffic_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/Traffic_full_hyp.sh -------------------------------------------------------------------------------- /scripts/Full_HyperSearch/Weather_full_hyp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Full_HyperSearch/Weather_full_hyp.sh -------------------------------------------------------------------------------- /scripts/HyperParameter_Tuning/ETT_optuna_unified.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/HyperParameter_Tuning/ETT_optuna_unified.sh -------------------------------------------------------------------------------- /scripts/HyperParameter_Tuning/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/HyperParameter_Tuning/readme.md -------------------------------------------------------------------------------- /scripts/Model_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Model_architecture.png -------------------------------------------------------------------------------- /scripts/Multivariate_long_term_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Multivariate_long_term_result.png -------------------------------------------------------------------------------- /scripts/Multivariate_long_term_result_unified_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Multivariate_long_term_result_unified_setting.png -------------------------------------------------------------------------------- /scripts/Unified/ETTh1_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/ETTh1_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Unified/ETTh2_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/ETTh2_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Unified/ETTm1_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/ETTm1_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Unified/ETTm2_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/ETTm2_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Unified/Electricity_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/Electricity_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Unified/Traffic_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/Traffic_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Unified/Weather_Unified_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Unified/Weather_Unified_setup.sh -------------------------------------------------------------------------------- /scripts/Univariate/ETTh1_univariate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Univariate/ETTh1_univariate.sh -------------------------------------------------------------------------------- /scripts/Univariate/ETTh2_univariate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Univariate/ETTh2_univariate.sh -------------------------------------------------------------------------------- /scripts/Univariate/ETTm1_univariate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Univariate/ETTm1_univariate.sh -------------------------------------------------------------------------------- /scripts/Univariate/ETTm2_univariate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Univariate/ETTm2_univariate.sh -------------------------------------------------------------------------------- /scripts/Univariate_long_term_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/Univariate_long_term_result.png -------------------------------------------------------------------------------- /scripts/data_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/scripts/data_tree.png -------------------------------------------------------------------------------- /utils/RevIN.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/RevIN.py -------------------------------------------------------------------------------- /utils/Tuner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/Tuner.py -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/losses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/losses.py -------------------------------------------------------------------------------- /utils/m4_summary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/m4_summary.py -------------------------------------------------------------------------------- /utils/metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/metrics.py -------------------------------------------------------------------------------- /utils/output_database.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/output_database.py -------------------------------------------------------------------------------- /utils/timefeatures.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/timefeatures.py -------------------------------------------------------------------------------- /utils/tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secure-and-Intelligent-Systems-Lab/WPMixer/HEAD/utils/tools.py --------------------------------------------------------------------------------