Dan Zheng

Results 77 comments of Dan Zheng

> I'm having trouble shuffling a tensor along a specified axis. I tried using a shuffled array of indices to do this, like so: > > ```swift > var indices:...

> First, I'm not entirely sure where the `indices` attribute is coming from. I'm using the latest toolchain (`0.7`) and am getting `error: value of type 'Tensor' has no member...

Reopening, as the original question (a "shuffle" function like [tf.random.shuffle](https://www.tensorflow.org/api_docs/python/tf/random/shuffle)) has not yet been answered.

> @dan-zheng `Math.swift` can definitely be broken down, but if that is the long term solution, isn't there a chance it might be lead to over-granular files? I think we...

Here's the PR that added `Tensor` pretty-printing: https://github.com/apple/swift/pull/23837. The Swift implementation of `ShapedArray.description` is largely based on the PyTorch pretty-printing implementation, which is a simpler version of NumPy's: TF-419. The...

Nice, thanks for sharing your code snippet! Could you please complete the example by showing the invocation of `ShapedArray.description(...)` used to print the array contents? --- I would describe your...

Thanks for the context! Feel free to open a PR, if you'd like to upstream your `func description(...)` changes.

Thank you! Take your time - Santa and we are patiently waiting for you after Xmas.

> 🎅 tbh GitHub needs to enable more than eight reaction emoji 🙎🏻‍♂️

Hi Porter, Thanks for reporting. Could you please share the stock toolchain that you've downloaded?