Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to replicate Results

オープン
#4 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
huggingface, python, pytorch

調査の方向性

No repository files or tests are identified. Start by tracing load_model(args), the encoder and head construction, and the torch.load/model.head.load_state_dict path, then compare them with the paper and Hugging Face CLIP-ViT-L-14 setup; done means identifying why the initial BCE loss differs and documenting a reproducible result.

索引モデルが issue の本文から書いたものです。

説明

Hello,

I am currently trying to test your model's weights with some data, but I am encountering some issues. I have set up the final linear layer as per your design, and am using the Clip-Vit-L-14 weights from Hugging Face. Despite following the methodology outlined in your paper and implementing it in my own model, the results don't seem to match the expected outcomes.

Here is a brief outline of my current setup:

class SingleLayerHead(nn.Module):
    def __init__(self, input_size: int, output_size: int):
        super().__init__()
        self.fc = nn.Linear(input_size, output_size)

    def forward(self, features, **kwargs):
        return self.fc(features)

class ImageBatchClassifier(LightningModule):
    def __init__(
        self,
        config: Dict[str, Any],
        encoder: nn.Module,
        head: nn.Module,
        loss: nn.Module,
    ):
        super().__init__()
        self.config = config
        self.encoder = encoder
        self.head = head
        self.loss = loss

        # Here we freeze all the weights of the encoder
        for param in self.encoder.parameters():
            param.requires_grad = False

if __name__=="__main__":
    model = load_model(args)
    state_dict = torch.load("your_weights",map_location='cpu')
    state_dict = {'fc.'+k: v for k, v in state_dict.items()}
    model.head.load_state_dict(state_dict)

As can be seen, I've frozen all the weights of the encoder. When running the code, the initial Binary Cross Entropy (BCE) Loss is surprisingly high, starting around 5.

I'd appreciate any guidance or suggestions on what could be the possible reasons for this issue, and how to resolve it.

Thank you in advance

Edit.: This is not the working code, just an simple implementation idea

主要言語
Python
スター
379
フォーク
60
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WisconsinAIVision/UniversalFakeDetect のほかの issue

WisconsinAIVision/UniversalFakeDetect の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。