I’m just trying to run the NBs to get my head around things, and have hit an error pretty quickly.
As of about 20 minutes ago (~2019-04-22 1140 PDT) I’ve
Reinstalled the swift-tensorflow-DEVELOPMENT package
git pulled and reinstalled the jupyter kernel
git pulled the fastai_docs repo
Running the notebook 00_load_data is fine until cell 11 when I get this:
error: <Cell 12>:7:40: error: cannot convert value of type 'Int' to expected element type 'Int32'
let shape: TensorShape = labels ? [batch] : (flat ? [batch, 784] : [batch, 28, 28])
^~~~~
Int32( )
This is bringing back the utter bafflement of new error types in a new language I’m not sure when it’s trying to convert an Int to an Int32. Is this PEBCAK or a bug?
Edit: Changing line 6 from:
let batch = training ? 60000 : 10000
to
let batch = training ? Int32(60000) : Int32(10000)
Has let me proceed. Perhaps this a “teachable moment” waiting to be explained in the lesson?
In my swift-jupyter directory to register the kernel. Something changed because before that, I was getting a different error (complaining about the %install magic lines), and those went away after I did that. Is there anything else I should check?
Thanks Brett, is there a difference between a nightly and the swift-tensorflow-DEVELOPMENT-* bundle? Because I thought I was using that.
Oh from looking at the commit I’ll try installing a TensorFlow nightly as well, if that’s what you mean. I’ll give it a shot and report back. (Edit: no that’s the wrong tree to be barking up).
OK I’m happy to consider this a me problem. Hopefully v0.3 will be released any minute now and this’ll be fine.
I think your version of swift is fine then? Registering the kernel here and using a nightly, runs beginning to end for me. For what it’s worth, wrapping everything in Int32() casts is the correct way of dealing with this error, you’re not doing anything wrong there.