```python
import torch
import torch.nn as nn
from torch.utils.cpp_extension import load_inline


_cuda_source = r"""
#include <torch/extension.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <c10/cuda/CUDAException.h>
#include <cuda_runtime.h>
#include <cstdint>

constexpr int THREADS = 256;
constexpr int TILE = 4096;

__device__ __forceinline__ float warp_sum(float value) {
    for (int offset = 16; offset > 0; offset >>= 1)
        value += __shfl_down_sync(0xffffffff, value, offset);
    return value;
}

__global__ void spatial_sum_kernel(
    const float* __restrict__ x,
    float* __restrict__ partials,
    int64_t spatial,
    int parts,
    int64_t total_blocks
) {
    __shared__ float warp_sums[8];

    for (int64_t block = blockIdx.x;
         block < total_blocks;
         block += gridDim.x) {
        const int64_t plane = block / parts;
        const int part = block % parts;
        const int64_t start = int64_t(part) * TILE;
        float value = 0.0f;

        #pragma unroll
        for (int j = 0; j < TILE / THREADS; ++j) {
            const int64_t position = start + threadIdx.x + j * THREADS;
            if (position < spatial)
                value += x[plane * spatial + position];
        }

        value = warp_sum(value);
        if ((threadIdx.x & 31) == 0)
            warp_sums[threadIdx.x >> 5] = value;
        __syncthreads();

        if (threadIdx.x < 32) {
            value = threadIdx.x < 8 ? warp_sums[threadIdx.x] : 0.0f;
            value = warp_sum(value);
            if (threadIdx.x == 0)
                partials[block] = value;
        }
        __syncthreads();
    }
}

__global__ void finish_kernel(
    const float* __restrict__ partials,
    const float* __restrict__ weight,
    const float* __restrict__ conv_bias,
    const float* __restrict__ extra_bias,
    float* __restrict__ output,
    int in_channels,
    int out_channels,
    int kernel_elements,
    int parts,
    float inverse_output_area
) {
    extern __shared__ float storage[];
    float* input_sums = storage;
    float* logits = input_sums + in_channels;
    float* reduction = logits + out_channels;

    const int batch = blockIdx.x;
    const int tid = threadIdx.x;

    for (int i = tid; i < in_channels; i += THREADS) {
        const int64_t base = (int64_t(batch) * in_channels + i) * parts;
        float value = 0.0f;
        for (int p = 0; p < parts; ++p)
            value += partials[base + p];
        input_sums[i] = value * inverse_output_area;
    }
    __syncthreads();

    // Every input element contributes each kernel coefficient exactly once
    // to the spatial sum of this stride-one, unpadded transposed convolution.
    float local_max = -CUDART_INF_F;
    for (int c = tid; c < out_channels; c += THREADS) {
        float value = 0.0f;
        for (int i = 0; i < in_channels; ++i) {
            const int64_t base =
                (int64_t(i) * out_channels + c) * kernel_elements;
            float weight_sum = 0.0f;
            for (int k = 0; k < kernel_elements; ++k)
                weight_sum += weight[base + k];
            value = fmaf(input_sums[i], weight_sum, value);
        }
        value = (value + conv_bias[c]) + extra_bias[c];
        logits[c] = value;
        local_max = fmaxf(local_max, value);
    }

    reduction[tid] = local_max;
    __syncthreads();
    for (int stride = THREADS / 2; stride > 0; stride >>= 1) {
        if (tid < stride)
            reduction[tid] = fmaxf(reduction[tid], reduction[tid + stride]);
        __syncthreads();
    }
    const float maximum = reduction[0];
    __syncthreads();

    float local_sum = 0.0f;
    for (int c = tid; c < out_channels; c += THREADS)
        local_sum += expf(logits[c] - maximum);

    reduction[tid] = local_sum;
    __syncthreads();
    for (int stride = THREADS / 2; stride > 0; stride >>= 1) {
        if (tid < stride)
            reduction[tid] += reduction[tid + stride];
        __syncthreads();
    }

    if (tid == 0)
        output[batch] = 10.0f * (maximum + logf(reduction[0]));
}

torch::Tensor pooled_transpose_cuda(
    torch::Tensor x,
    torch::Tensor weight,
    torch::Tensor conv_bias,
    torch::Tensor extra_bias
) {
    const c10::cuda::CUDAGuard device_guard(x.device());

    const int batch = x.size(0);
    const int in_channels = x.size(1);
    const int out_channels = weight.size(1);
    const int kh = weight.size(2);
    const int kw = weight.size(3);
    const int64_t spatial = x.size(2) * x.size(3);
    const int parts = (spatial + TILE - 1) / TILE;

    auto output = torch::empty({batch, 1}, x.options());
    if (batch == 0)
        return output;

    auto partials = torch::empty({batch, in_channels, parts}, x.options());
    const int64_t total_blocks = int64_t(batch) * in_channels * parts;
    const int blocks = total_blocks < 65535 ? int(total_blocks) : 65535;
    const auto stream = at::cuda::getCurrentCUDAStream();

    spatial_sum_kernel<<<blocks, THREADS, 0, stream>>>(
        x.data_ptr<float>(),
        partials.data_ptr<float>(),
        spatial,
        parts,
        total_blocks
    );
    C10_CUDA_KERNEL_LAUNCH_CHECK();

    const int64_t output_area =
        (x.size(2) + kh - 1) * (x.size(3) + kw - 1);
    const size_t shared_bytes =
        size_t(in_channels + out_channels + THREADS) * sizeof(float);

    finish_kernel<<<batch, THREADS, shared_bytes, stream>>>(
        partials.data_ptr<float>(),
        weight.data_ptr<float>(),
        conv_bias.data_ptr<float>(),
        extra_bias.data_ptr<float>(),
        output.data_ptr<float>(),
        in_channels,
        out_channels,
        kh * kw,
        parts,
        1.0f / float(output_area)
    );
    C10_CUDA_KERNEL_LAUNCH_CHECK();
    return output;
}
"""

_extension = load_inline(
    name="fused_transpose_global_pool_lse",
    cpp_sources=r"""
#include <torch/extension.h>
torch::Tensor pooled_transpose_cuda(
    torch::Tensor x,
    torch::Tensor weight,
    torch::Tensor conv_bias,
    torch::Tensor extra_bias
);
""",
    cuda_sources=_cuda_source,
    functions=["pooled_transpose_cuda"],
    extra_cflags=["-O3"],
    extra_cuda_cflags=["-O3"],
    verbose=False,
)


class ModelNew(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, bias_shape):
        super().__init__()
        self.conv_transpose = nn.ConvTranspose2d(
            in_channels, out_channels, kernel_size
        )
        self.bias = nn.Parameter(torch.randn(bias_shape))

    def forward(self, x):
        conv = self.conv_transpose
        use_custom = (
            x.is_cuda
            and x.dtype == torch.float32
            and conv.weight.dtype == torch.float32
            and conv.bias.dtype == torch.float32
            and self.bias.dtype == torch.float32
            and x.ndim == 4
            and x.shape[1] == conv.in_channels
            and x.shape[2] > 0
            and x.shape[3] > 0
            and tuple(self.bias.shape) == (conv.out_channels, 1, 1)
            and conv.in_channels + conv.out_channels + 256 <= 12000
            and not torch.is_autocast_enabled()
            and not (
                torch.is_grad_enabled()
                and (
                    x.requires_grad
                    or conv.weight.requires_grad
                    or conv.bias.requires_grad
                    or self.bias.requires_grad
                )
            )
        )

        if use_custom:
            return _extension.pooled_transpose_cuda(
                x.contiguous(),
                conv.weight.contiguous(),
                conv.bias.contiguous(),
                self.bias.contiguous(),
            )

        x = conv(x)
        x = x.mean(dim=(2, 3), keepdim=True)
        x = x + self.bias
        x = torch.logsumexp(x, dim=1, keepdim=True)
        return x.sum(dim=(2, 3)) * 10.0
```