<reponame>StepNeverStop/RLs<gh_stars>100-1000
from typing import List

import torch.nn as nn


class VDNMixer(nn.Module):
    def __init__(self, **kwargs):
        super().__init__()

    def forward(self, q_values: List, state, **kwargs):
        """
        params:
            q_values: [T, B, 1, N]
        """
        return q_values.sum(-1)  # [T, B, 1]

from typing import List

import torch.nn as nn


class VDNMixer(nn.Module):
    def __init__(self, **kwargs):
        super().__init__()

    def forward(self, q_values: List, state, **kwargs):
        """
        params:
            q_values: [T, B, 1, N]
        """
        return q_values.sum(-1)  # [T, B, 1]
params:             q_values: [T, B, 1, N] # [T, B, 1]