Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoleao052 authored Mar 30, 2024
1 parent 8065dfa commit b87bbdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@
const torch = require("js-pytorch");

// Instantiate Tensors:
x = torch.randn([8,4,5]);
w = torch.randn([8,5,4], requires_grad = true);
b = torch.tensor([0.2, 0.5, 0.1, 0.0], requires_grad = true);
let x = torch.randn([8,4,5]);
let w = torch.randn([8,5,4], requires_grad = true);
let b = torch.tensor([0.2, 0.5, 0.1, 0.0], requires_grad = true);

// Make calculations:
out = torch.matmul(x, w);
let out = torch.matmul(x, w);
out = torch.add(out, b);

// Compute gradients on whole graph:
Expand Down

0 comments on commit b87bbdf

Please sign in to comment.