I might be missing something, but how did you get that error relating to neural.init when I don't see that function called anywhere in the script you posted?