MCPcopy Create free account
hub / github.com/OpenRL-Lab/Wandb_Tutorial / Model

Class Model

basic/test_pytorch.py:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12import torch
13
14class Model(torch.nn.Module):
15 def __init__(self):
16 super(Model, self).__init__()
17 self.hid1 = torch.nn.Linear(4, 7) # 4-7-3
18 self.oupt = torch.nn.Linear(7, 3)
19
20 def forward(self, x):
21 z = torch.tanh(self.hid1(x))
22 z = self.oupt(z)
23 return z
24
25
26def parse(args):

Callers 1

test_pytorchFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_pytorchFunction · 0.68