Upload 2 files
Browse files
spectral/notebooks/experiment_5_matrix_decompositions.ipynb
CHANGED
|
@@ -1970,6 +1970,7 @@
|
|
| 1970 |
" self.output_dim = 3 * 3 + self.pool_size * self.pool_size # 3\u00d73 channel gram + spatial eigen\n",
|
| 1971 |
" print(f\"[EIGEN] dim={self.output_dim}\")\n",
|
| 1972 |
"\n",
|
|
|
|
| 1973 |
" def forward(self, x):\n",
|
| 1974 |
" B, C, H, W = x.shape\n",
|
| 1975 |
" # Channel gram matrix\n",
|
|
|
|
| 1970 |
" self.output_dim = 3 * 3 + self.pool_size * self.pool_size # 3\u00d73 channel gram + spatial eigen\n",
|
| 1971 |
" print(f\"[EIGEN] dim={self.output_dim}\")\n",
|
| 1972 |
"\n",
|
| 1973 |
+
" @torch.amp.custom_fwd(device_type='cuda', cast_inputs=torch.float32)\n",
|
| 1974 |
" def forward(self, x):\n",
|
| 1975 |
" B, C, H, W = x.shape\n",
|
| 1976 |
" # Channel gram matrix\n",
|
spectral/notebooks/experiment_7_composite_pipelines.ipynb
CHANGED
|
@@ -2036,6 +2036,7 @@
|
|
| 2036 |
" self.output_dim = self.scatt_dim + self.stft_dim + self.eigen_dim\n",
|
| 2037 |
" print(f\"[MULTISIG] scatt={self.scatt_dim} + stft={self.stft_dim} + eigen={self.eigen_dim} = {self.output_dim}\")\n",
|
| 2038 |
"\n",
|
|
|
|
| 2039 |
" def forward(self, x):\n",
|
| 2040 |
" B, C, H, W = x.shape\n",
|
| 2041 |
" # Scattering\n",
|
|
|
|
| 2036 |
" self.output_dim = self.scatt_dim + self.stft_dim + self.eigen_dim\n",
|
| 2037 |
" print(f\"[MULTISIG] scatt={self.scatt_dim} + stft={self.stft_dim} + eigen={self.eigen_dim} = {self.output_dim}\")\n",
|
| 2038 |
"\n",
|
| 2039 |
+
" @torch.amp.custom_fwd(device_type='cuda', cast_inputs=torch.float32)\n",
|
| 2040 |
" def forward(self, x):\n",
|
| 2041 |
" B, C, H, W = x.shape\n",
|
| 2042 |
" # Scattering\n",
|