Solved by Nikronic in post #2 
              
              
                Hi, 
There are some issues regarding your weight init. 


Never use .data for changing the weights or biases, it may cause problems.
Instead of trying to find the proper module using searching its name in string format, try to use exact object instance using isinstance method:

def weights_init(m):
…