MOE pruning

Daze_Lu發表於2024-03-31

knowledge

Identity()

model.fc2 = nn.Identity(): replace fc2 as identity, which just return what it gets, do that may be you want to disable that layer.

pruned_model.fc1.weight.copy_(model.fc1.weight): copy model.fc1.weight to pruning_model.fc1.weight

相關文章