implementations
This commit is contained in:
17
crypto/gogo/model/trading_model.py
Normal file
17
crypto/gogo/model/trading_model.py
Normal file
@ -0,0 +1,17 @@
|
||||
# model/trading_model.py
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
|
||||
class TradingModel(nn.Module):
|
||||
def __init__(self, input_dim, hidden_dim, output_dim):
|
||||
super(TradingModel, self).__init__()
|
||||
self.fc1 = nn.Linear(input_dim, hidden_dim)
|
||||
self.fc2 = nn.Linear(hidden_dim, hidden_dim)
|
||||
self.fc3 = nn.Linear(hidden_dim, output_dim)
|
||||
|
||||
def forward(self, x):
|
||||
x = F.relu(self.fc1(x))
|
||||
x = F.relu(self.fc2(x))
|
||||
x = self.fc3(x)
|
||||
return x
|
Reference in New Issue
Block a user