MCPcopy Create free account
hub / github.com/Modulus-Labs/RockyBot / __init__

Method __init__

pytorch-model/models.py:105–123  ·  view source on GitHub ↗
(self, dataset_ref, h1_dim=128, h2_dim=256, h3_dim=256, h4_dim=128)

Source from the content-addressed store, hash-verified

103 5-Layer classifier for ETH/BTC dataset.
104 """
105 def __init__(self, dataset_ref, h1_dim=128, h2_dim=256, h3_dim=256, h4_dim=128):
106
107 super(Simple_5_Layer_Classifier, self).__init__()
108
109 # --- Save the dims ---
110 self.x_dim = dataset_ref.get_input_dim()
111 self.out_dim = dataset_ref.get_output_dim()
112 self.h1_dim, self.h2_dim, self.h3_dim, self.h4_dim = h1_dim, h2_dim, h3_dim, h4_dim
113
114 # --- Layers ---
115 self.linear_1 = nn.Linear(in_features=self.x_dim, out_features=self.h1_dim)
116 self.activ_1 = nn.ReLU()
117 self.linear_2 = nn.Linear(in_features=self.h1_dim, out_features=self.h2_dim)
118 self.activ_2 = nn.ReLU()
119 self.linear_3 = nn.Linear(in_features=self.h2_dim, out_features=self.h3_dim)
120 self.activ_3 = nn.ReLU()
121 self.linear_4 = nn.Linear(in_features=self.h3_dim, out_features=self.h4_dim)
122 self.activ_4 = nn.ReLU()
123 self.linear_5 = nn.Linear(in_features=self.h4_dim, out_features=self.out_dim)
124
125 def forward(self, x):
126 h1 = self.activ_1(self.linear_1(x))

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
get_input_dimMethod · 0.45
get_output_dimMethod · 0.45

Tested by

no test coverage detected