Hi Daniel!



 dayala:

However, the results are terrible overall.
…
def create_dense_block(input_size, output_size, hidden_sizes:list, dropout_rate=0.1):
    layers = []
    input_sizes = [input_size,] + hidden_sizes
    output_sizes = hidden_sizes + [output_size,]

    for iz, oz in zip(input_sizes, output_sizes):
        if(dropout_rate > 0):
            layers.append(nn.Dropout(dropout_rate))
        layers.append(nn.Linear(iz, oz))
        layers.append(nn.Tanh())

# The feedforward architecture



As written, create_dense_block() doesn’t return anything.


class DenseNetwork(nn.Module): 
        ...
        self.fc1 = create_dense_block(number_features*sequence_size, 100, [500,500,400,200], dropout_rate=0)
        ...

    def forward(self, x:torch.Tensor):
        ...
        x = self.fc1(x)



I’m surprised that your code runs rather than throwing an error.
You assign self.fc1 to the “result” of a no-return function, so
self.fc1 should have None assigned to it.  So I would expect
x = self.fc1(x) to throw an error because you can’t call None
as if it were a function.
Best.
K. Frank