Us..To Him

I need you. I need the release and safety of subspace. When you shook my hand, the first thing I thought was how it would feel gripping my neck. What it would do to me. How it could hold my body…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




TensorFlow predictions using GPUs

Easy TensorFlow classifications using local GPU power with deephaven.learn

By Jeremiah Chang

The example project uses a simple neural network to recognize three different classes in the Iris-flower data set. We’ll see how this computation can be performed on GPU.

Before following along with my sample code, go through the setup steps below.

For my computer, GeForce 3050 is my default GPU. We can see that the GPU usage is 0% at this point.

This is all it takes to install Deephaven:

We first import the packages and build the server on port 10000, which allows us to access the Deephaven IDE there later:

We can run this code to check if the GPU is accessible by TensorFlow:

Here we use the Iris data set, a very common data science data set for illustration. I did some data pre-processing to assign numeric classes to each flower category:

These functions are to make sure that the input and output values are the correct data types:

Now we see that the GPU usage goes up to 4%.

Think about how we can do it interactively. I prefer to do code editing on VS code, then after the script is executed, analyze and plot the results in the Deephaven IDE since it provides a better UI. What about you?

Add a comment

Related posts:

Pdata is Hiring to all talented Writers and Graphic Designers!

PDATA is seeking to increase its brand awareness and would like to reward content producers in their native language with $20 in PDATA tokens in exchange for published ARTICLES and or VIDEOS over the…

NFTs in the Film Industry

NFTs and blockchain technology are the game changer in most industries dealing with intangible content. But there’s a lot of new exploring about how NFTs can shake up traditional intangibles like…

Gone

I saw the best minds and machines of my generation rise to the high-water mark of shared democratic purpose, only to watch the waves roll back, down through the dank familiar sewers of inequality and…