Closed arafatkatze closed 8 years ago
Are you cool with the dependency on narray for Complex data types, I used because ruby array does not have pack for complex data type ?
As far as I can tell, SciRuby currently prefers NMatrix over NArray big time (and NArray is in the strange development state, it seems). Does NMatrix have functionality you need? Or maybe it is not so complex to implement by hands, sticking with just Ruby Array?
@zverok we had NMatrix in shortly, but removed it again (https://github.com/Arafatk/tensorflow.rb/pull/16) since it didn't install without manual intervention on macs, https://github.com/SciRuby/nmatrix/issues/505#issuecomment-231302232. But actually, it looks like they've fixed this by now: https://github.com/SciRuby/nmatrix/pull/530. @Arafatk do you wanna swap in NMatrix instead of NArray (provided specs still pass)?
@chrhansen Thanks for the suggestion. I have used narray for the simple reason that it has to_s method for Complex arrays. We don't have that feature in Ruby Array and also its not available in NMAtrix. I have tried searching but I could not find any other popular gem that does this.
Before we review this a few questions
If this works fine for you,then I will add support for a few data types that I had left before in set_type method of tensor(and also for constant).
Another important thing to be noted is that tf.variable will also be made using advantage of constant op.