Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator Error #8

Open
t1804330987 opened this issue Jan 2, 2025 · 0 comments
Open

Generator Error #8

t1804330987 opened this issue Jan 2, 2025 · 0 comments

Comments

@t1804330987
Copy link

class Generator(nn.Module):
"""Fake Label Generator in SemiReward"""

def __init__(self, feature_dim=384):
    super(Generator, self).__init__()
    self.fc_layers = nn.Sequential(
        nn.Linear(feature_dim, 256),
        nn.ReLU(),
        nn.Linear(256, 128),
        nn.ReLU(),
        nn.Linear(128, 64),
        nn.ReLU(),
        nn.Linear(64, 1)  # Error  , Alter : nn.Linear(64, num_classes) 
    )

def forward(self, x):
    x = self.fc_layers(x)
    x = F.relu(x)
    return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant