PyTorch モデルは,つぎのようなプログラム:
#################################
# nn_brain.py
#################################
import torch
from torch import nn
class NN_Brain(nn.Module):
def __init__(self):
super().__init__()
self.network = nn.Sequential(
nn.Linear(80, 128),
nn.ReLU(),
nn.Linear(128, 128),
nn.ReLU(),
nn.Linear(128, 16)
)
def forward(self, x):
return self.network(x)
|