How to input multiple features by pytorch

I just started to learn about machine learning. When I tried to do some small things, I found that there was only one feature entered in the pytorch content on the Internet, which may be because my keywords were wrong. If I want to use pytorch to create a model, how can I enter multiple features to achieve better calculation results?

as follows, if I want to be a classifier to judge the type of encryption, the type of a ciphertext can be judged by the character type and the length of the ciphertext, but now I can only enter one feature, the character type.

class PasswordClassifier(nn.Module):
    def __init__(self, i_char, o_labels):
        super(PasswordClassifier, self).__init__()
        self.l_char = nn.Linear(i_char, o_labels)

    def forward(self, f_char):
        return self.linear(f_char)

model = PasswordClassifier(CHARS_LEN, len(LABELS_INDEX))
loss_func = nn.CrossEntropyLoss()
optimizer = torch.optim.SGD(model.parameters(), lr=LEARNING_RATE)

now I want to enter another ciphertext length feature. How can I add input features and loss functions to my model to better connect the model to the output tag?


before asking this question, I don't know much about the class nn.module and the basics of pytorch

in the nn.Module class of pytorch, the number of features of each layer is passed in when initializing _ _ init__ .
take my classifier as an example, this classifier is very simple, there are not many layers in the network, just do a linear regression operation. The incoming
i_char is the number of input features, and o_labels is the number of input features. For example, my features have ciphertext type and ciphertext length, and the ciphertext type produces 26 + 26 + 10 = 62 features (not counting symbols first). At this time, I also want to add a ciphertext length feature, which is 63 features.

each time the class is called, that is, its _ _ call__ , the function calls the forward function and passes in what we passed in when we called model . This incoming content is the relevant content of the feature.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7bc2eb-2a1f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7bc2eb-2a1f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?