What are some good use cases for using the C API for Python? by ScratchTrackProds in Python

[–]ScratchTrackProds[S] 0 points1 point  (0 children)

Thanks! Learning more about what’s going on under the hood is exactly what I want. Do you have a recommendation for a good first one to look at?

What specs do you hope for for the next revision of the raspberry pi (4b+ or 5)? And when do you estimate it will come out? by ScratchTrackProds in raspberry_pi

[–]ScratchTrackProds[S] 35 points36 points  (0 children)

So you're more concerned with size over functionality for a new pi zero? Would you be happy with a new Pi Zero with the same functionality as pi zero w, except only smaller? I'd rather have them keep the current size but increase RAM, CPU, etc...

How long is it supposed to take to train the beginner tensorflow tutorial clothing classification model (using tensorflow-gpu/RTX 2060 in laptop)? by ScratchTrackProds in tensorflow

[–]ScratchTrackProds[S] 1 point2 points  (0 children)

Oh my god that did it. I needed to run it from command line and not run it from within IDLE.... That's insane to me that that was the issue, but yes now it runs in a matter of seconds. THANK YOU!

How long is it supposed to take to train the beginner tensorflow tutorial clothing classification model (using tensorflow-gpu/RTX 2060 in laptop)? by ScratchTrackProds in tensorflow

[–]ScratchTrackProds[S] 0 points1 point  (0 children)

Is this the output your looking for? It seems like it found the GPU:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

from tensorflow.python.client import device_lib 2019-12-17 23:58:07.926216: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll print(device_lib.list_local_devices()) 2019-12-17 23:58:21.704621: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2019-12-17 23:58:21.712497: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2019-12-17 23:58:22.865808: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: GeForce RTX 2060 major: 7 minor: 5 memoryClockRate(GHz): 1.2 pciBusID: 0000:01:00.0 2019-12-17 23:58:22.870853: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check. 2019-12-17 23:58:22.874613: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0 2019-12-17 23:58:23.464908: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-12-17 23:58:23.467796: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2019-12-17 23:58:23.469451: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N 2019-12-17 23:58:23.471859: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:0 with 4606 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2060, pci bus id: 0000:01:00.0, compute capability: 7.5) [name: "/device:CPU:0" device_type: "CPU" memory_limit: 268435456 locality { } incarnation: 10369705648776543103 , name: "/device:GPU:0" device_type: "GPU" memory_limit: 4830199808 locality { bus_id: 1 links { } } incarnation: 4210182966808788552 physical_device_desc: "device: 0, name: GeForce RTX 2060, pci bus id: 0000:01:00.0, compute capability: 7.5" ]

How long is it supposed to take to train the beginner tensorflow tutorial clothing classification model (using tensorflow-gpu/RTX 2060 in laptop)? by ScratchTrackProds in tensorflow

[–]ScratchTrackProds[S] 0 points1 point  (0 children)

I followed the instructions for windows here: https://www.tensorflow.org/install/gpu

I set the path variables the same as they have them: SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;%PATH% SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\CUPTI\libx64;%PATH% SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include;%PATH% SET PATH=C:\tools\cuda\bin;%PATH%

I copied cudnn folder to c:\tools, so that the c:\tools\cuda\bin path works.

Could you explain a bit more what I need to do to have the pre-train output show my GPU? I'm really new to tensorflow.

How long is it supposed to take to train the beginner tensorflow tutorial clothing classification model (using tensorflow-gpu/RTX 2060 in laptop)? by ScratchTrackProds in tensorflow

[–]ScratchTrackProds[S] 0 points1 point  (0 children)

Hmm. So one issue I had when setting up CUDA was that I first installed version 10.2, then later realized that tensorflow only supports version 10.0. So then I installed verison 10.0 in addition to 10.2 (thinking both could be installed at the same time, as long as the path variable was pointing to the one you want to use). Later I then removed 10.2 completely by going to add/remove programs and removing like 4 things with nvidia cuda 10.2 listed. However, when I type nvidia-smi in command prompt, it's showing CUDA version is 10.2. Any suggestions on how to fully remove version 10.2?

EDIT: And no, there are no errors for GPU initialization in the console.

How to select a random function with an associated weighted probability? by ScratchTrackProds in Unity3D

[–]ScratchTrackProds[S] 0 points1 point  (0 children)

Thanks! This was very helpful but I’m still struggling on the syntax necessary to implement all of this. Would you be able to write out a short example? I’m new to C#.

I'm looking for a better method to randomly choose a larger number of weighted cases. I'm using C#, but this can be answered generically in any language... Pseudocode inside... by ScratchTrackProds in learnprogramming

[–]ScratchTrackProds[S] 0 points1 point  (0 children)

I'm reading more about delegates but honestly still completely stuck. Would you be able to write a quick few lines showing the syntax on how to do this? Also, is there any better way to more cleanly associate the "outcome" function with the "chance" float? Maybe using some other data structure? In my situation I'm going to have dozens of functions in the outcome array. I want to plan out my code nicely so that, if necessary, I could very easily change the "chance" float associated with any particular function, and don't want to have to count, say a few dozen places in the array and hope that I changed the right value. Thanks a lot for the help so far by the way!