Deep Learning with Swift for TensorFlow by Rahul Bhalley

Deep Learning with Swift for TensorFlow by Rahul Bhalley

Author:Rahul Bhalley
Language: eng
Format: epub
ISBN: 9781484263303
Publisher: Apress


Listing 3-46Type conversions between Swift types and PythonObject

OutputPython type of pyFive is int.

Swift type of pyFive is PythonObject.

swiftDescription (conversion accomplished!): Swift’s Python interoperability feature is beautiful!

One of the most important tools in a data scientist’s toolkit is visualization which even machine learning researchers and practitioners also require. With the help of Python interoperability, we can do data visualization in S4TF easily. See Listing 3-47 for a simple example. Make sure you have already installed the Matplotlib library via the Pip package manager; otherwise, simply run the following command in the terminal: pip install --upgrade matplotlib.

Figure 3-5The graph of an exponential function plotted with the Matplotlib library of Python via interoperation with S4TF



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.