How to change float type to tensor type

Hello everyone, thank you very much for seeing my question and thinking!
I have a problem now: after extracting the bias value, I did the data processing, and then used the update function to put the updated bias back into the network. But the value of bias becomes the float type, not the Tensor type I want. I would like to ask, how to convert the float type directly into a tensor type?
If you have encountered similar problems and know the solution, thank you very much for replying to me!

Could you post the code you are using to manipulate the bias?
I’m currently not sure what the issue is and maybe you would just have to warp it in a nn.Parameter.

I am very happy to receive your reply. I extracted the trained bias value and replaced the bias value with the rebp function. Then test the network comparison accuracy, and found that bias does not affect the change of precision, and after the replacement of the bias, print out the float type data, not the Tensor type.

        bias_name = 'layer' + str(id + 1) + '.bias'#提取bias值
        layer_bias_upper = list(state_dict[bias_name])#存入列表layer_bias__upper

#        print(layer_bias_upper)

        if   p==0:
        elif p==1:
        elif p==2:

        for i,value2 in enumerate(range(0,numn)):
#            if i < 2:

               adder = CDLL('rank-b/')
               d1 = c_double(layer_bias_upper[i])
               repb = adder.repb

               repb.restype = c_double

               layer_bias_upper[i]=repb(p,i,d1) #The repb function returns a float value and assigns it to bias
         dict_layer_bias_upper = {bias_name: layer_bias_upper}