2,207,745 questions
Advice
0
votes
1
replies
10
views
How initializing weights with large value causes vanishing gradient problem in neural network
I was watching this tutorial on weight initialization in neural network, and im not able to understand this statement:
In case of Tanh, Sigmoid activation, If we initialize weights with large values (...
-3
votes
1
answer
63
views
Can someone help me not make the code terminate whenever i input "right" [closed]
i understand this is seemingly simple im a beginner i apologize if ive wasted anyones time but im pretty lost rn heres my code
print ("you awaken in a dark room")
print ("you look to ...
1
vote
1
answer
31
views
Distributed computing with Ray/Python has no parallelism at all on GCP
I am trying to setup a distributed environment for NLP processing. I use Ray and Python on GCP. I have a master and several workers. What happens is that when I run 1 worker or 8 workers, it takes ...
Best practices
0
votes
1
replies
23
views
Namespace tracking best practices
I'm new. Is it best practice to make a list of the variable's "namespace," and if so, what are some of the methods to track them that others might use? Are there other things that should be ...
Advice
0
votes
3
replies
37
views
Terminal closing after outputting code result
I'm new to coding, and I'm trying to use VS code to learn Python. I had an issue when I ran the debugger. I got some extra output showing something like this:
PS C:\Users\user\Desktop\Python\oops> ...
Best practices
0
votes
1
replies
25
views
How to Use Threading in Python (and How to Go Beyond It)
The Direct Answer to the Original Question
If you simply want to run a function in a separate thread, the minimal working pattern is:
import threading
def worker():
print("Running in a ...
-2
votes
0
answers
47
views
Select 3 random items from a 2 column list [closed]
For a role-playing game, I want to create an NPC generator.
The skills are stored in a CSV file with 2 columns, e.g.:
Kraftakt (KO/KK/KK),KTL
Überreden (MU/IN/CH),GTL
Geographie (KL/KL/IN),WTL
where ...
1
vote
1
answer
37
views
Tensorflow Keras CV tutorials incorrectly working
I have an intersting error. I'm starting learning Machine Learning by Tensorflow Keras CV tutorials and two of my tutorial projects working incorrectly
I use this tutorials:
https://www.tensorflow.org/...
Advice
0
votes
1
replies
46
views
How do i fix the string limit of my code?
So i wrote this code which is used for parsing the information from the webpage to te text file. it works fine but it can write down only 501 string in the txt. How can i fix the code to remove this ...
Advice
0
votes
4
replies
62
views
Finding substrings from the string using sets: algorithm's logic
I was solving the algorithm problem: find all unique substrings from the string, using sets.
Here is the model solution, but I can't understand what line 6 means. Why does the end go up to length + 1? ...
0
votes
0
answers
26
views
Preventing matplotlib ax.annotate from overflowing with WCS projection
A scatter plot with an astropy wcs projection is limited to just the xlim/ylim of the axis, even if there are points outside that range:
ra = 151.416293
dec = 12.115556
points = np.random.normal(loc=(...
2
votes
1
answer
50
views
Why does SteamGifts return a 403 response when I access SteamGifts in Python code?
Here's the Python code
import httpx
url = "https://www.steamgifts.com/"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 ...
-5
votes
0
answers
45
views
flet displays wrong view after pop?
im having issues in flet 0.80.5 with my back button or view_pop.
async def view_pop(e):
page.views.pop()
top_view = page.views\[-1\]
await page.push_route(top_view.route)
my on route ...
0
votes
0
answers
37
views
How to install pyaudio for python 3.6 on win7,32-bit PC (with VC++ v.14.29.30139 already installed)
I am trying to install pyaudio on an old win7 32-bit laptop, with Python 3.6.8 already installed.
I have installed the latest compatible version of pip, and then numpy and mapplotlib.
I issue the ...
Best practices
2
votes
5
replies
68
views
Python script interface
I have a few python scripts that I want to run on a small raspberry pi project I've been working on and I want to use a launcher or something so I can launch them without a pc or anything does anyone ...