Created
July 18, 2019 15:34
-
-
Save tanmayb123/f43daf99a810f29afd1b9233a2f4a1fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TensorFlow | |
import Python | |
let np = Python.import("numpy") | |
let randomNumbers = Tensor<Float>(randomUniform: [5, 5]) | |
print(randomNumbers) | |
let rotatedRandomNumbers = Tensor<Float>(numpy: np.rot90(randomNumbers.makeNumpyArray())) | |
print(rotatedRandomNumbers) | |
print(np.fliplr(rotatedRandomNumbers.makeNumpyArray()).shape) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment