hi, thank you for you snippet code. In fact I removed Variable (x) from each line and I get gradients as well as it is training well.
thank you again, very much for having spent time on my code and for your precious help
regards and thanks.