Solved by huoge in post #2 
              
              
                It looks like you are trying to quantize the scripted net. 
The correct order seems like first quantize your net then script it!