implementations

This commit is contained in:
Dobromir Popov
2025-02-12 01:27:38 +02:00
parent 1a15ee934b
commit 33a5588539
6 changed files with 595 additions and 22 deletions

View 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