テストモデル保存
Browse files- merge-pytorch-model.py +3 -0
merge-pytorch-model.py
CHANGED
|
@@ -48,3 +48,6 @@ sparse_linear.load_state_dict(sparse_linear_state_dict)
|
|
| 48 |
|
| 49 |
# カスタムレイヤーの重みを元のモデルの重みに追加
|
| 50 |
model.sparse_linear.load_state_dict(sparse_linear.state_dict())
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
# カスタムレイヤーの重みを元のモデルの重みに追加
|
| 50 |
model.sparse_linear.load_state_dict(sparse_linear.state_dict())
|
| 51 |
+
|
| 52 |
+
# マージされたモデルの保存
|
| 53 |
+
torch.save(model.state_dict(), "merged_pytorch_model.bin")
|