I am not sure of your usecase and why do you take this route of modifying with state_dict().
There are two things that you could try:







 Karthik_Ganesan:

    self.conv_1 = MyConv2d((self.custom_value.item()), 1, 4, 5, stride=1, padding=0)



Try passing self.custom_value without .item(). i.e., pass the reference of the object so that if you change the values, it gets reflected in self.conv_1.

Instead of dealing with state_dict, why not create a method to set custom_value dynamically?
and set it as self.custom_value[0] = <new val> without creating new tensor.