From 51d74e8c3b81ef6f351df60f11d85dd2efa865f3 Mon Sep 17 00:00:00 2001 From: Vinayak Dev Date: Mon, 7 Oct 2024 23:05:05 +0530 Subject: [PATCH] [docs] Remove call to `t()` in external param example. --- docs/website/docs/guides/ml-frameworks/pytorch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/website/docs/guides/ml-frameworks/pytorch.md b/docs/website/docs/guides/ml-frameworks/pytorch.md index e80dec9e852d..54efe6ef2c58 100644 --- a/docs/website/docs/guides/ml-frameworks/pytorch.md +++ b/docs/website/docs/guides/ml-frameworks/pytorch.md @@ -355,8 +355,8 @@ linear_module = LinearModule(4,3) # Create a params dictionary. Note that the keys here match LinearModule's # attributes. We will use the saved safetensor file for use from the command # line. -wt = linear_module.weight.t().contiguous() -bias = linear_module.bias.t().contiguous() +wt = linear_module.weight.data.contiguous() +bias = linear_module.bias.data.contiguous() params = { "weight": wt, "bias": bias } save_file(params, "params.safetensors")