Online Python Pytorch Free Compiler
X = torch.tensor([-1, 2])
W = torch.tensor([3, -2])
y = torch.sigmoid(1 + X.T @ W)
print(y)
philip
X = torch.tensor([-1, 2])
W = torch.tensor([3, -2])
y = torch.sigmoid(1 + X.T @ W)
print(y)
import torch
from torch import nn
conv = nn.Conv2d(1,1,kernel_size=3, padding=1, stride=2, bias=False)
X = torch.FloatTensor([[[
[4, 2, -1],
[-6, 0, 5],
[3, 2, 2]]]])
conv.weight.data = torch.FloatTensor([[[
[0, 1, 2],
[1, -1, 0],
[1, 0, -2]]]])
res = conv(X).data[0,0]
print(res)
test test test test
print("hi")
print ("online python pytorch free compiler")
import torch
X = torch.arange(12, dtype=torch.float32).reshape((3,4))
X[-1], X[1:3]