Regarding weight and bias initialization for sequential model from the text file

i have reference model which is evaluated using pretrained model,i have weights,bias and input to the function…to check individually i took single conv2d has a sequential model. and i have initialized the input,weights and bias from the text file(values obtained from the refernce model)

but the problem is output from the Conv2d is not matching with the refernce model output (which is also a Conv2d with all same attributes)
here is my code…
“”"import torch
import torch.nn as nn
import csv
import torch
import pandas as pd
import math
import numpy

class PrintLayer(nn.Module):
def init(self):
super(PrintLayer, self).init()
selfconv = nn.Sequential(
nn.Conv2d(96, 256, kernel_size=5, stride=1, padding=2)

    a_file1 = open("2nd layer weight.txt","r")
    list_of_lists1 = []
    for line in a_file1:
      stripped_line1 = line.strip()
      line_list1 = stripped_line1.split()

    b = torch.from_numpy(numpy.array(list_of_lists1,dtype= 'float32'))
    w = torch.tensor(b)
    ten = w.reshape(256,96,5,5)
    selfconv[0] = ten

    a_file12 = open("bias.txt","r")
    list_of_lists12 = []
    for line in a_file12:
      stripped_line12 = line.strip()
      line_list12 = stripped_line12.split()

    c = torch.from_numpy(numpy.array(list_of_lists12,dtype= 'float32'))
    d = torch.tensor(c)
    ten1 = d.reshape(256)
    selfconv[0] = ten1

    #print(selfconv[0] =
def forward(self, x):
    # Do your print / debug stuff here
    #print("x is",x)
    return x

selfconv = nn.Sequential(
nn.Conv2d(96, 256, kernel_size=5, stride=1, padding=2),

a_file = open(“input_27_27_96.txt”,“r”)
list_of_lists = []
for line in a_file:
stripped_line = line.strip()
line_list = stripped_line.split()
b = torch.from_numpy(numpy.array(list_of_lists,dtype= ‘float32’))
x = torch.tensor(b)
x = x.reshape(1,96,27,27)
x =x.double()
state_dict = selfconv.state_dict()
output = selfconv(x.float())
print((selfconv[0].weight == state_dict[‘0.weight’]).all())
print((selfconv[0].bias == state_dict[‘0.bias’]).all())

@ptrblck can you please provide the solution for it…i am very new to python and pytorch