Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Binary pretrained model can't train a multi-class classifier?

Đang mở
#172 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, pytorch
Lĩnh vực
machine-learning

Hướng nghiên cứu

Bắt đầu với lời gọi GraphormerForGraphClassification.from_pretrained và ví dụ graphml-classification.md, sau đó tái tạo script Python bằng checkpoint clefourrier/graphormer-base-pcqm4mv2 và 168 lớp. Kiểm tra xem classifier-size warning hay tiến trình huấn luyện bị đình trệ mới là vấn đề cần xử lý; hoàn tất khi quá trình huấn luyện đa lớp tiếp tục diễn ra hoặc lỗi được giải thích rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I use model_checkpoint = "clefourrier/graphormer-base-pcqm4mv2" # pre-trained model from which to fine-tune to be my pretrained model, and my dataset is here.
I follow the code in this website.
But change the

model = GraphormerForGraphClassification.from_pretrained(
    model_checkpoint, 

    # We have 167 attack patterns and 1 benign
    num_classes=168, 

    # provide this in case you're planning to fine-tune an already fine-tuned checkpoint
    ignore_mismatched_sizes = True, 

Since I have 168 class to be classified.
Then when I run the python script, I encountered:

Some weights of GraphormerForGraphClassification were not initialized from the model checkpoint at clefourrier/graphormer-base-pcqm4mv2 and are newly initialized because the shapes did not match:
- classifier.classifier.weight: found shape torch.Size([1, 768]) in the checkpoint and torch.Size([168, 768]) in the model instantiated
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
  0%|                                                                                                                                                                                                                                          | 0/23120 [00:00<?, ?it/s]

For about 20 min, the log didn't move at all.

Ngôn ngữ chính
Python
Star
2.5k
Fork
374
Merge trung bình
14 giờ 51 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/Graphormer

Tất cả issue của microsoft/Graphormer

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.