develop #11

Merged
Fabel merged 22 commits from develop into main 2025-04-04 20:12:21 +00:00
2 changed files with 8 additions and 9 deletions
Showing only changes of commit 25f4225baf - Show all commits

BIN
input.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

View File

@ -15,17 +15,16 @@ class aiuNN(AIIA):
# Pass the unified base configuration using the new parameter. # Pass the unified base configuration using the new parameter.
self.config = aiuNNConfig(base_config=base_model.config) self.config = aiuNNConfig(base_config=base_model.config)
self.upsample = nn.Upsample( # Enhanced approach
scale_factor=self.config.upsample_scale, scale_factor = self.config.upsample_scale
mode=self.config.upsample_mode, out_channels = self.base_model.config.num_channels * (scale_factor ** 2)
align_corners=self.config.upsample_align_corners self.pixel_shuffle_conv = nn.Conv2d(
)
# Conversion layer: change from hidden size channels to number of channels from the config.
self.to_rgb = nn.Conv2d(
in_channels=self.base_model.config.hidden_size, in_channels=self.base_model.config.hidden_size,
out_channels=self.base_model.config.num_channels, out_channels=out_channels,
kernel_size=1 kernel_size=self.base_model.config.kernel_size,
padding=1
) )
self.pixel_shuffle = nn.PixelShuffle(scale_factor)
def forward(self, x): def forward(self, x):