Here, I am providing a few chunks of my code where it gives an error regarding matrix multiplication. I am new here, and I am trying but unable to figure out its solution. If possible, please help me out.
BP Weight_model start
Weight_classifier(
(weight_layer): MaskedLinear(in_features=215, out_features=215, bias=True)
(outlayer): Linear(in_features=215, out_features=215, bias=True)
)
batch_size_8,learning_rate_0.01,epoch_times_1
Traceback (most recent call last):
File "/home/bvs/neelam/input_ourmodel/input/4valid.py", line 1012, in <module>
validation(Terms[0], 5)
File "/home/bvs/neelam/input_ourmodel/input/4valid.py", line 994, in validation
each_fold_scores = Main(train_set, test_set, func=func)
File "/home/bvs/neelam/input_ourmodel/input/4valid.py", line 884, in Main
out = weight_model(weight_features)
File "/home/bvs/miniconda3/envs/crisprcasfinder/envs/envML/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/bvs/neelam/input_ourmodel/input/4valid.py", line 314, in forward
weight_out = self.weight_layer(weight_features)
File "/home/bvs/miniconda3/envs/crisprcasfinder/envs/envML/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/bvs/neelam/input_ourmodel/input/4valid.py", line 331, in forward
return F.linear(input, masked_weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (8x645 and 215x215)`
Here, I am providing link of all my input file that i am using in this model (4valid.py). (GitHub - neelam19051/DLmodel)
Thank you so much!