Langsung ke konten utama

Preparing Anaconda with Tensorflow [ACTUALLY WORKED FOR ME 2024]

Make sure to follow this with perfect order:

1. conda create -n tf_gpu tensorflow-gpu

2. conda activate tf_gpu

3. pip install numpy==1.23.4

[EXECUTE GPU TEST CODE] ==> CODE MUST RETURN GPU NUMBER > 0 [#CONFIRMED]

4. pip install tensorflow-gpu==2.10

[EXECUTE GPU TEST CODE] ==> CODE MUST RETURN GPU NUMBER > 0 [#CONFIRMED]

5. pip install tensorflow==2.10

[EXECUTE GPU TEST CODE] ==> CODE MUST RETURN GPU NUMBER > 0 [#CONFIRMED]

(You may skip the first two test, but it helps ensure your environment is set up right)

 

TRIVIA:

- There's no 2.11 version of Tensorflow GPU on pip as shown below:

ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.11 (from versions: 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.12.0)
ERROR: No matching distribution found for tensorflow-gpu==2.11 

- I suspect for Tensorflow > 2.10 should be doable without the tensorflow-gpu since according to TF, 2.11 onward has GPU support integrated but am too tired to test at 1AM

- Some other tutorials might suggest you to install keras, but remember that the initial package from conda already has keras inside

- Available Tensorflow on pip:

Available versions: 2.18.0, 2.17.1, 2.17.0, 2.16.2, 2.16.1, 2.15.1, 2.15.0, 2.14.1, 2.14.0, 2.13.1, 2.13.0, 2.12.1, 2.12.0, 2.11.1, 2.11.0, 2.10.1, 2.10.0, 2.9.3, 2.9.2, 2.9.1, 2.9.0, 2.8.4, 2.8.3, 2.8.2, 2.8.1, 2.8.0, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7.0, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.3, 2.5.2, 2.5.1, 2.5.0


CODE AND FILES:

[1] GPU TEST CODE

import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

[2] MNIST Test from acsu.buffalo.edu

 

If you feel this has been a very helpful quick guide, don't forget to recommend this post to your friends also struggling with this nonsense! Also, you can tip me here!

Komentar

Postingan populer dari blog ini

Kenapa Sekarang?

Years ago, I seek it. Dulu, aku berjuang untuk bisa melewati batas teman, trying to be someone that you consider as dearest. Yes, that's back then. As I said, had it been years ago, I would have straight out say YES out of sheer dumbness, or tenacity, or both. Tabun. I used to be full of desire to get you to acknowledge me, then. Sungguh lucu sekali, I would circumvent and try to just get any chance to meet with you. Aku menginginkan lebih, dulu. But no, it has always been someone else. Someone else get to be your priority, your attention. Berharap lebih adalah kesalahanku, dan aku selalu menganggapnya demikian. Why chase over the skies you cannot reach? I almost burned the entire bridge, truly. Only one more step and I know the entire relationship will turn into nothing more than smoldering ashes in the seas of lost time. You know, had you not talk to me within the short time of me settling my almost 9-years long illusion, perhaps the bridge had been burned completely, as I had wi...

Da Vinci Surgical System

Report Group Members Avian Lukman Setya Budi 2216100055 Satria Bhaskara Adinugraha 2216100081 Rafi Rasyid Putra 2216100106 Qaedi Aufar Saifuddin Bantasyam 2216100133 Witri Andini 2616100017 Muhammad Daffa Abiyyu Rahman 2916100010 Introduction As time passes by, the development of technology in the world grows. This growth includes all aspects, such as communication, transportation, health, and so on. In health field, the development of technology is mandatory to face sickness, especially the new, complex and far more complicated to handle than the predecessors. Practice of surgery to human body has been done a lot as of late and these practices are not easy, which means only those with the knowledge and the experience in surgery field are permitted to do surgeries. The operations that needs to be done become more complicated and dangerous because the body part that needs surgery are the vital ones such as ...

Tentang Mencari Ilmu (2021)

"Children are natural learners. It's a real achievement to put that particular ability out, or to stifle it. Curiosity is the engine of achievement." - Sir Ken Robinson "Tidak ada pencari ilmu yang tidak merasakan sakit. Bagi mereka, lebih baik itu daripada pahitnya kebodohan."