Closed ematejska closed 3 years ago
I'm unable to reproduce this on macOS using the current 0.12 release toolchain. I tried all variants I could think of for the above, and none of them produced the error any longer. I'm hoping this was fixed in the interim, so I'l closing this issue.
Importing from JIRA: https://bugs.swift.org/browse/TF-1264
Training a neural network with the softMaxCrossEntropy() function within the valueWithGradient() call back results in the following error
Similar error was found with TF-1230 and the provided solution did not work.
The error does not point to the valueWithGradient() function, but I assume the error came from that function by running through pint statements on every function and the printing stopped at the end of the callback.
Any idea on how evaluate this error?
By CyrilCyril Garcia added a comment - 26 Apr 2020 9:15 PM Further examination suggest this may be a bug when referencing the model parameter within the callback. The function works fine when referencing the model outside the callback.
Dan Zheng added a comment - 27 Apr 2020 12:43 AM Could you please share a full program reproducing the error? Also, how are you running S4TF? If you're using a S4TF toolchain, could you please also share the output of swift --version?
Cyril Garcia added a comment - 27 Apr 2020 2:20 PM Hi Dan, thanks for the response. I'm running S4TF on Xcode 11.4.1 in a macOS app template.
Sure, here is the model
training data, hard coded for testing purposes
The training process