#data-science-and-ml

1 messages · Page 160 of 1

tender hearth
#

High school thesis or uni?

turbid field
#

sorry i dont have enough knowledge yet

#

so im trying to grasp what to except

tender hearth
#

I don’t think it’s novel enough to be accepted

#

at least, based on my experience ha

fast geode
#

where can I talk bout web scraping?

tender hearth
#

research ko back in high school was using a face recognition model in a video compression algorithm to keep faces high quality

#

Can be used in video conferencing

#

You’d need to go much deeper than just “classifying types of vehicles”, since there’s hundreds of models that already do that online

tender hearth
#

yeah

turbid field
tender hearth
#

English only in the server pls, it’s a rule

turbid field
#

ayon kasi recommendation samin ng civil prof

tender hearth
#

But we can take it to dms

turbid field
#

ay

#

why is it not novel enough

turbid field
tender hearth
#

But if you propose and they accept it, go lang

#

But if I were you I would try finding another problem or make it more specific

turbid field
#

even with raspberry pi implementation to count cars and classify them? also pala we will log it in web-based datebase e

turbid field
#

our drowsiness detection for car implementation got rejected tho

turbid field
tender hearth
#

If you’re gonna use it as part of another research, then that’s fine

#

As long as it’s not the main part of your research

tender hearth
#

Also which uni is this?

turbid field
tender hearth
#

Okay, valid tbh

turbid field
#

may before researchers daw that coducted almost same concept but they gave up daw eh

turbid field
#

but no main hehe

tender hearth
#

ohh, I was abt to get excited haha

#

main here

turbid field
#

AY WEH ASHUDHUASHUASHASDHASHDAH

tender hearth
turbid field
#

what yr?

#

electronics no

tender hearth
#

Secret

tender hearth
#

If you do decide to go forward with the vehicle classification, there’s lots of resources online for that

turbid field
#

idk anong tawag sa survey

#

but they were counting from 9am to 8pm?

#

so we did consult the research adviser, and told us to automate it

tender hearth
#

Look at their metho

#

Then adapt it to your use case

turbid field
#

ohhh using mobilenet

#

thanks

tender hearth
#

Yepyep

toxic holly
#

yeah im pretty sure

#

im using libraries im using cv2 and mediapipe

#

i managed to get a real time handtracker that counts hwo many fingeres you have up

#

and then using that i wanna develop it to do sign language as wel

#

for the model im using pytorch

#

and thats it

#

wbu

lapis sequoia
#

Hello everyone

regal galleon
#

(Note: I am a newbie in this field)

K-Fold Cross-Validation, f1 score, and train-Test Split, statistical tests such as McNemar's.

Despite all this, I don't think it's exactly the right way to understand it. It comes out after you try it in a real-life problem. The model can perform very well. What about outliers? Values ​​that change over time? So I think the best way is to test it with different data. A test data that is statistically different.

#

Things like train test splits only increase the model's reliability. They can be misleading. I've experienced this.

#

In fact, increasing the number of data seems like the only real solution. 😅 👀

glacial root
# toxic holly wbu

right now for the number classifier i'm doing it from scratch (just numpy), but when i do the sign language one i'm thinking of doing a real time one, not sure if i'll do it from scratch or with cv libraries though

#

typically how do mle interviews run, as in what's the structure

daring karma
#

A friend and I are attempting to create an open source project that automatically identifies unattractive clauses in end user license agreements/privacy policies. I mostly come from a background of reverse engineering and security research and not data science, but I am very passionate about this.

#

I figure NLP is likely our best bet?

#

My understanding is that transformer models are somewhat unwieldy and kind of like a black box.

serene scaffold
serene scaffold
daring karma
serene scaffold
#

I guess that's not your point of confusion.

daring karma
serene scaffold
#

can you tell me what you mean by "definite output shapes"?

daring karma
#

The ideal output might be spans of text with "low-level" details such as: [BINDING, ARBITRATION]

main fox
#

For classification tasks, yes. The model classifies data into categories it was trained on (zero shot is an exception).

NER is a type of classification where each word is classified into one of the entities specified in training

daring karma
main fox
#

Sounds like it, yes. You could go the NER route or test specific prompting of an LLM.

daring karma
#

Is it possible to get an LLM to determinately emit structured output?

serene scaffold
daring karma
glacial root
#

would a real time sign language identifier be a good resume project

main fox
#

Yes

serene scaffold
raven cloud
#

Hi!
Stuck on not being able to get llama.cpp-python to use the gpu.

  • Nvidia-SMI shows that cuda 12.5 is installed
  • I installed doing : pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu125
  • Here is the script im using:
from llama_cpp import Llama

llm = Llama(
      model_path="../../models/DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf",
      n_gpu_layers=-1, # Uncomment to use GPU acceleration
      # seed=1337, # Uncomment to set a specific seed
      # n_ctx=2048, # Uncomment to increase the context window
)
output = llm(
      "Q: Name the planets in the solar system? A: ", # Prompt
      max_tokens=32, # Generate up to 32 tokens, set to None to generate up to the end of the context window
      stop=["Q:", "\n"], # Stop generating just before the model would generate a new question
      echo=True # Echo the prompt back in the output
) # Generate a completion, can also call create_completion
print(output)_

After running this keeps pooping up:

print_info: EOG token        = 128008 '<|eom_id|>'
print_info: EOG token        = 128009 '<|eot_id|>'
print_info: max token length = 256
load_tensors: layer   0 assigned to device CPU
load_tensors: layer   1 assigned to device CPU
load_tensors: layer   2 assigned to device CPU

The logs has literraly zero mentions of GPU (Crtl+F) does not show any results for GPU
Any help appreciated

glacial root
#

i thought the complexity of it is typical of resume projects

serene scaffold
# glacial root it would?

uh, yes? are you talking about just drawing bounding boxes around signs, or translating whole communications into a written language?

glacial root
#

not whole communications

serene scaffold
#

what will the input be? images that are cropped around exactly one sign?

glacial root
#

no i mean if i had a camera in the application and it could classify what i'm "saying"

#

just single letters though

serene scaffold
#

you know that sign language isn't just letters, right?

glacial root
#

though maybe i could have a system where it records the letters to be able to "type" messages

glacial root
#

those i would have to figure out how to do

serene scaffold
#

and that would be incredibly ambitious.

glacial root
#

yeah that's why i thought of just letters

#

or maybe i should just try an autonomous drone (probably would be tougher but it's what i want to work with in the future)

serene scaffold
#

how would you distinguish between signs that are letters and signs that are not?

glacial root
#

well it would only pick up the sign if it's able to classify it into one of the letters right

raven cloud
# raven cloud Hi! Stuck on not being able to get llama.cpp-python to use the gpu. - Nvidia-SM...

Ok got it working but what gives ?

{'id': 'cmpl-b1422a3e-f391-4f18-813b-7d7466d574bc', 'object': 'text_completion', 'created': 1741033924, 'model': '../../models/DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf', 'choices': [{'text': "Q: Name the planets in the solar system? A: 1. Mercury 2. Venus . . . Hmm, wait, that's it? Only two? No, that can't be right. I must", 'index': 0, 'logprobs': None, 'finish_reason': 'length'}], 'usage': {'prompt_tokens': 14, 'completion_tokens': 32, 'total_tokens': 46}}

32 max_tokens and the question prompt were also default

serene trellis
#

any tips to reduce state space for RL QLearn? currently doing a biclustering algo but since its for a recommender system i need to guarentee that there's at least an instance of each row in at least one bicluster

#

since if an user isnt in a bicluster i cant generate recommendations

glacial root
#

yo this might be a dumb question but i genuinely don't know, if i'm implementing a neural network from scratch and use np.gradient, does that still count as done from scratch?

devout sail
#

You decide

#

Is it for some school work?

small wedge
serene scaffold
glacial root
#

just to learn

glacial root
devout sail
#

Depends on how far you want to go then. Implementing the autograd yourself is common in school exercises

bright thorn
#

can somebody help me with a virtual enviornment issue via anaconda prompt. I am basically trying to import keras and tensorflow into my jupyter notebook but I keep getting errors that tensorflow keras cannot be found.

bright thorn
#

im using a mix of chatgpt and stackoverflow and im going insane lmao

hearty depot
bright thorn
#

jupyter

hearty depot
glacial root
#

yo guys do i need a virtual environment if i have anaconda

#

cause anaconda already comes with all the needed packages, so what else would i need a virtual environment for

serene scaffold
bright thorn
#

keras and tensorflow show up

serene scaffold
#

@bright thorn I recommend closing your thread if you're not going to post the whole error message and you're receiving help here instead.

hearty depot
#

🤓

bright thorn
serene scaffold
bright thorn
#

ok

hearty depot
bright thorn
#

browser as in when I load it up, it appears on my google chrome

hearty depot
#

i'll say tho if u cant figure it out soon just make normal venv or use something like uv/poetry

bright thorn
serene scaffold
#

anyway, anaconda was created when intalling dependencies like numpy was nontrivial. but that's no longer the case. so in the vast majority of circumstances, anaconda just creates a barrier between data scientists and the rest of the python community, for absolutely no benefit.

I work for an AI company with over 10 thousand employees, and anaconda is banned at my company.

bright thorn
#

type shi man

serene scaffold
#

like, they literally deleted anaconda from everyone's laptop one day. (except it wasn't on my laptop)

bright thorn
#

nice

hearty depot
bright thorn
#

@serene scaffold did you go to a prestigeious school before getting your current job

#

im just curious bc im deciding on colleges rn

serene scaffold
bright thorn
#

gotcha

#

I wanna go to a school that has a mix of good student life but also good education obviously but I just dont know how I should view it honestly

serene scaffold
#

if you're a hard-working and skillful person, and you go to an "average" university, it will be easier for you to get the special opportunities that are only available to the hardest-working and most skillful students.

bright thorn
#

fair

#

but I guess I just worry that even with hard work that i won't be able to benefit any special opportunies if i dont go to the right school

hearty depot
bright thorn
hearty depot
#

georgia tech

bright thorn
#

ok so, im chopped and i could not get in 💔

#

this year for college apps was so fucked

#

i could have prolly had a chance if i was born a diff year but like i barely got into schools and places where I got rejected/waitlisted I most likely would have had better chances

serene scaffold
hearty depot
bright thorn
bright thorn
#

ot

#

oh wait*

#

i didnt read the entire message mb

hearty depot
#

u good bro

#

one of mu biggest regrets was not grinding harder in covid cuz i had all the free time in the world to get skills uo

bright thorn
#

yea I understand experience / practice is what helps but rn Im kinda just full with my hands on my current class bc im doing learning development for ai models

hearty depot
#

like i shit u not there were ppl in my graduating class that couldnt do i/o in any language u doing fine

bright thorn
#

idk I mean my teacher says shi like that but atp in this current time of computer science where imposter syndrome is common i just feel behind

bright thorn
#

like umd was my dream school but i got rejected, which was crazy from the start since they only accepted 100 comp sci applicants but I was just too cocky id get in

hearty depot
bright thorn
bright thorn
hearty depot
#

like main reason why ppl cant code or get job coming out of college is that theydont code on consistent basis

bright thorn
hearty depot
bright thorn
hearty depot
bright thorn
hearty depot
bright thorn
#

but yea like i said this year every school practically had a crazy surplus of applicants which even lead to rutgers lowering their acceptence rate to like 30

hearty depot
#

u'll be fine bro, the school does matter to an extent im not gonna lie to u esp for stuff like getting vc funding or very early stage startups but tech recruiting is mostly meritocratic so if u r qualified u will get a decent job

bright thorn
hearty depot
#

like i wouldnt really consider places like west virginia and loyola md as like places that r super strong at cs or where resarch is priority

#

penn state altho its lowk a party school it gets a lot of funding for research and also a lot of kids from my hs that went there didnt really have trouble finding a decent job givrn they were dilligent

serene scaffold
#

(Maryland drakenah DC drakeyeh )

#

but I also now have the same job as both of them bing_shrug

serene scaffold
toxic holly
#

my friend recently bought a pi and a camera module so we're gonna try make the sign language in real time work with the pi and stuff

cobalt eagle
#

Good day, I would be grateful for your help and advice. I tried to use YOLO models found on the internet to detect a dog in real time on the camera image. I failed because the dog and the surroundings have very similar colors. Is it a good idea to create my model and train it on photos of my dog ​​(Siberian husky)? I only care about the script detecting my dog ​​in the selected square. Is training the dog model on a set of 300+ photos of my dog ​​a better idea that might work? 🙂 I plan to use YOLO8l. Thank you for the advice! best regards

chilly sleet
#

umm any recommendation for which gemini-openai proxy to use

pine ibex
buoyant vine
#

😅 That is equally a very general statement

turbid field
#

why is jetson orin nano so hard to find

#

almost sold out anywhere

tender hearth
#

pretty sure you can run yolo type models in real time on an rpi

turbid field
#

rpi with hailo kit?

tender hearth
#

yeah I did it for my high school research

#

Well not exactly, but I found out you could while doing my research

turbid field
#

rpi 4?

tender hearth
turbid field
#

4?

#

what camera did u use pala?

#

usb type or module?

tender hearth
#

I couldn’t tell you, I didn’t do it, I just discovered you could while writing the RRL, because it was important for our research that you could run our program without expensive accelerator devices like the hailo kit and jetson nano etc

#

There’s an article out there from tensorflow (or maybe PyTorch) on this topic, im sure you can find it

turbid field
#

ohhhh

#

we might change it kasi

#

ocr for license plate, vehicle classfication, and car counter

#

dont have idea gaano ka heavy sa computation

#

3 in 1

ruby jungle
#

Hi guys,
I'm doing this pie chart but as you can see all names titles are not visible, how can i make to show all names using matplotlib?

long locust
#

Might need to change the orientation of the labels, or add a legend

#

Another option is to lump all of the very small ones into a single category

main fox
#

For that many categories, consider using a bar chart instead

glacial root
#

well then i think i'll uninstall it and set up a venv

glacial root
serene scaffold
glacial root
glacial root
#

i had git lfs installed and initialized but it just wouldn't work and continued to give the large file error

#

now it's fixed though

#

nevermind i got my hopes up too soon

#

i really thought

#

that push was taking an outrageously long time compared to normal so i thought it was working, but after waiting literally almost 10 minutes it finished loading and gave me the same large file detected error

#

unfortunate

warm iron
toxic holly
#

we managed to get it running on the pi

#

but my neural network did not work lmaoo

#

it was so inaccurate icl i think it was j randomly guessing

hollow lily
#

hi guys

#

i hope this is the right channel

#

when i create a .txt doc, enter code and rename .py, the doc open, black, then shut down. here is th code: from openai import OpenAI

Step 1: Initialize the OpenAI client

client = OpenAI(api_key="your-openai-api-key")

Step 2: Create a chat completion

response = client.chat.completions.create(
model="gpt-4", # Use "gpt-4" or "gpt-3.5-turbo"
messages=[
{"role": "user", "content": "write a haiku about AI"}
]
)

Step 3: Print the response

print(response.choices[0].message.content)

#

i've already import open ai with cmd

#

if someone can help...

toxic holly
hollow lily
#

and it does that a lots of time also with other pi doc

toxic holly
#

That's not the command i dont think

hollow lily
hollow lily
#

do you think their can be a link with azure cloud shell?? cuz i've seen some malicious stuff on my laptop since a bit of time idk

hearty depot
#

use diff formm of visualization cuz its not apt for it

unkempt apex
warm iron
unkempt apex
glacial root
#

literally just a perceptron at that point, no backpropagation

glacial root
#

does tqdm work in jupyter notebook

serene scaffold
main fox
#

not that just tqdm doesn't work, but it might give you a warning

hearty depot
glacial root
#

nothing in real time

glacial root
#

and it doesn't work when i import tqdm.notebook

#

it's probably fine though cause when i just import from tqdm everything works fine

#

nevermind the tqdm bar that is working is kinda janky, first time it seemed fine but now it prints each number seperately instead of replacing

toxic holly
#

currently retraining it tho!

#

on like 6000/220 000 but hopefully by morning it will be done

glacial root
#

damn that's crazy

#

it takes that long to train?

toxic holly
#

so icl my code is probably pretty inefficient

glacial root
#

my code is definitely inefficient asl lol

toxic holly
#

it does around 100 images/second

glacial root
#

it takes like 20-30 seconds to set up a perceptron with the mnist dataset

toxic holly
#

for a macbook i cant complain that mcuh

glacial root
toxic holly
#

but yeah my friend overclocked his cpu with a 6700xt or something like that so we're gonna brute force it tmrw anyway

glacial root
#

i honestly don't know

toxic holly
#

can i see ur code lol

glacial root
#

wait let me check again, i might be exaggerating a bit

toxic holly
#

hah okay

glacial root
#

ok yeah it was 20

toxic holly
glacial root
#

here's my code by the way

toxic holly
#

what libs are you using

glacial root
#

pandas is only to parse the data though

#
nums = data.iloc[:50000, 0].to_numpy()
input_data = data.iloc[:50000, 1:].to_numpy()
output = np.zeros((50000, 10))
expected_output = np.zeros((50000, 10))
for i in range(50000):
    hidden_layer_one = hl_one_feed_forward(input_data[i])
    hidden_layer_two = hl_two_feed_forward(hidden_layer_one)
    single_output = output_feed_forward(hidden_layer_two)
    output[i] = single_output
    expected_output[i][nums[i]] = 1```
#
def hl_one_feed_forward(activation):
    weight = np.random.randint(low = -5, high = 5, size = (15, 784))
    bias = np.random.randint(low = -50, high = 50, size = (15,))
    neuron = (np.matmul(weight, activation) + bias).astype(np.float128)
    sigmoid_neuron = 1 / (1 + np.exp(-1 * neuron))
    return sigmoid_neuron```
toxic holly
glacial root
toxic holly
#

yeah fair enough

glacial root
#

starting with just basics

toxic holly
#

ive only done the number recognising one before and thats basically a tutorial

#

how did you chooose the number 50,000 btw?

glacial root
#

there's 59,999 training examples

toxic holly
#

really?

#

my code counted over 220,000

#

somehow

glacial root
#

and the book i'm going through says i should use 50k and then save the rest 10k for hyperparameter tuning later

#

i'm trying to do it with as little guidance as possible and only learning theory from this book

#

not gonna even peek at the tutorial part lol

glacial root
#

not the sign language one

toxic holly
toxic holly
glacial root
#

nah all good

toxic holly
#

i did that one

glacial root
#

i'm not sure what's with the number though

toxic holly
#

and i made a little twist which you could try

glacial root
#

59,999

toxic holly
#

lmao idk

glacial root
#

all it took was one more training example lol

toxic holly
#

haha

glacial root
toxic holly
# glacial root oh what's the twist

basically i made a little gui and a really basic pen tool using pygame (dont judge) and then you can draw a number in a square it will resize it to 28 by 28 (for the 784 parameters) and then guess the number

#

it makes it much more fun to test

glacial root
#

i was deciding to make it into a webpage where i could input an image which would be resized to 28x28 and then it would guess

#

i honestly have never even heard of what pygame is lol

#

there's a lot of things i should know but don't

#

kinda scary how far behind i am

toxic holly
toxic holly
#

python has so many different libraries

glacial root
#

i struggle with git lol

toxic holly
#

for example ive been coding for probably over half my life and ive never used pandas before

glacial root
#

and setting up venvs

toxic holly
glacial root
#

when it comes to doing stuff in ubuntu i always have claude open telling me what to do lol

toxic holly
#

maybe the best way to create ai is to use it to create itself!?

glacial root
#

hopefully i'm not too cooked when i go to uni

toxic holly
#

or you can reply in dms if thats easier

glacial root
toxic holly
glacial root
#

nah i'm from the US

#

UK would be nice though, seems like a more chill place lol

toxic holly
#

lol america seems so much cooler

glacial root
#

nah lol

#

actually i don't know what it's like after high school yet

#

but high schools here suck

woeful grove
glacial root
woeful grove
#

do you have any other options as an american

glacial root
#

yeah i guess not

#

system just needs a lot of fixing

woeful grove
glacial root
#

true

#

not just that though, just kinda hard to find people who are serious

#

seems like everyone at school is always on some form of tomfoolery

soft kite
#

I am trying to make a chart similar to this but as an added bonus, I would like to modify the bars to modulate their width kind of like a violin plot. the data itself is the first and last time someone talked in a server and the modulating width would be probably a rolling average of chat activity month over month. I am trying to do it in matplotlib but I am reallly having a hard time making a violin chart with the kind of modulation that I want to begin with, let alone with multiple horizontal bars. @fleet latch for the cross channel ping

main fox
toxic holly
#

although tbf in uk highschool you narrow down subjects a lot more earlier which is good i guess

glacial root
#

though no errors though

#

is this just how it is with jupyter notebook?

silent helm
#

Hello chat. I'm planning to learn Generative AI. I am a freshman undergraduate at a university.

#

I don't know if I should learn machine learning and Deep learning before starting Generative AI

#

The problem I have with machine learning and Deep learning, I don't know where to start. If i start at basics I always have "learn X before Y" and "learn Y before Z"

serene scaffold
#

You should start with basics and work your way up

prisma tide
hearty depot
fervent vale
#

anyone professional in datascience

#

..?

chilly sleet
naive axle
#

anyone installed conda in WSL2 for tensorflow setup?

glacial root
#

like if you just get started on a basic neural network

#

that's what i'm doing, outside of just basic matrix and vector operations and partial derivates i knew nothing when i started

compact merlin
#

Hi everyone,
Has anyone managed to set up OAuth2 with Casdoor in Dify? I'd really appreciate it if you could share your experience or any guidance. Thanks in advance!

split olive
#

Is it not possible to run threads in streamlit?

hearty depot
fleet latch
serene scaffold
modern thorn
#

Hi. I do not know anything about llm and ai development. Right now i am building a chess game to learn ai or llm in the future. My main goal to learn ai by building chess ai. Can you share some topics possibly i need to learn in this journey?

glacial root
#

yo guys don't tell me the actual best way as i need to figure it out on my own, but if i'm setting up a neural network from scratch, once i have set up the perceptron and am setting up the gradient vector, should i get a np array of every single weight matrix and bias vector

#

50k samples and 2 hidden layers before the output layer so both of these np arrays would be of size 150k which is kinda wild

hearty depot
serene scaffold
hearty depot
lilac lichen
lilac lichen
toxic holly
chilly sleet
glacial root
#

to better understand how it works

hearty depot
glacial root
#

i mean just for now though

#

after this implementation i'm probably gonna be using frameworks for everything

hearty depot
glacial root
#

yeah but that's all of backpropagation in one method right

#

which would defeat the purpose of implementing it from "scratch"

hearty depot
#

i'd disagree, and in terms of like theory it allows for a greater degree of complexity and understanding modern deep learning

glacial root
#

!d numpy.gradient

arctic wedgeBOT
#

numpy.gradient(f, *varargs, axis=None, edge_order=1)```
Return the gradient of an N-dimensional array.

The gradient is computed using second order accurate central differences in the interior points and either first or second order accurate one-sides (forward or backwards) differences at the boundaries. The returned gradient hence has the same shape as the input array.
glacial root
#

better to set up a venv and install packages using pip

naive axle
#

does venv can have two cuda versions

brisk meteor
#

I think I wrote it right?

hearty depot
weary timber
#

i tried to code a image captioner but it seems to overfit, like it outputs the same sentence for all inputs, the output sentence is a gramatically correct but compeletely out of context sentence, i tried everything but i couldnt get to fix it someone help me pls

code : https://paste.pythondiscord.com/IW2A

#

btw when i train it it first starts with gibberish, then transforms to the output sentence that i get all the time

glacial root
#

cause how would autograd know what variables to take the partial derivatives with respect to

#

cause there's chain rule

hearty depot
# glacial root cause how would autograd know what variables to take the partial derivatives wit...

u do it base off the loss node, basically the idea is given the loss function u take the reversed topological sorting and use that to determine the order to find gradients
this repo covers it p well in terms of code imo:
https://github.com/karpathy/micrograd

GitHub

A tiny scalar-valued autograd engine and a neural net library on top of it with PyTorch-like API - karpathy/micrograd

glacial root
#

damn i haven't gotten that far in dsa

#

that's a part of dsa right

#

also the approach i mentioned earlier, would it work?

#

while it would use some pretty large arrays, the method itself probably isn't too hard since everything is gonna be plugged into one of two derivatives (chain rule of derivative with respect to either weight or bias)

cursive badge
#

this is my training function: ```# Create function to fit and score models
def fit_and_score(models, x, x_val, y, y_val):

np.random.seed(69)
model_scores = {}
for name, model in models.items():

    model.fit(x, x_val)
    y_predict_proba = model.predict_proba(y)

return roc_auc_score(y_val, y_predict_proba)```
#

I'm getting a value error when both x & y, and x_h1n1, y_h1n1 have the same shape

#

nvm i'm dumb

cursive badge
weary timber
serene scaffold
#

Can you explain exactly what you imagine what will happen when you "connect AI to visual studio"?

#

If you're asking how to use a code completion assistant--which is very incredibly more specific than "AI"--that would be a question for #editors-ides

glacial root
#

like "connect an ai with visual studio"

#

i know they probably are just unaware and have yet to learn more but

#

my bad for this 💀

#

i really shouldn't laugh, there's a ton of stuff i don't know either

serene scaffold
#

The way I said all of that probably came off meaner than I intended. But I legitimately didn't know what they were asking at first, and I'm irritated by how I'm increasingly expected to know people are talking about generative AI when they just say "AI"

#

I haven't heard of the kind of thing that you're talking about.

glacial root
#

unless someone's asking something like that to me directly, then yeah it irritates me too

#

i think the dude genuinely just didn't know how vast "AI" is, just like the majority of the population

#

the term has become more of a marketing buzzword than a field of technology

#

but with the way they were speaking, i presume he was just referring to copilot lol

past meteor
serene scaffold
past meteor
#

I did actually

serene scaffold
#

Also gratz on being a guest lecturer
But MBA 🤮

past meteor
#

I asked them what they believed AI was, all of them said gen ai related stuff and then I showed all interactions I had with ml/ai that morning, most of them obvs not gen ai

#

My colleague has a Tesla so I brought it up haha

serene scaffold
#

And does he regret buying it given present circumstances?

past meteor
iron basalt
past meteor
iron basalt
#

At some point a bunch of people will be on "only generative AI is AI," and will be left behind too.

#

Maybe it will cycle (like fashion).

cedar tusk
#

so when will we be able to create companies using ai?

glacial root
glacial root
#

i mean mba i guess is chill to an extent, depending on where you're going into

#

but bba 🤮

#

mba is just an extension of that but the degree can the useful for some cases, i would rather just get a masters in my field of interest though

#

most business majors don't know anything but yapping

long lion
arctic wedgeBOT
glacial root
plain leaf
#

yo chat, Can I like scrap data with Twitter API (free-tier), for like reading the tweets under specific "target words", and use the data to fine-tune a llm? and then if a user inputs a similar "target word" the model should fetch like last 1 week's tweets with the keywords and provide insights based on that, is it possible?

serene scaffold
#

if you just want the LLM to be able to give you a summary of a set of tweets, fine-tuning it on that tweets won't help you.

plain leaf
serene scaffold
plain leaf
serene scaffold
plain leaf
#

periodically update in the sense like manually update on database?

serene scaffold
plain leaf
#

lemme give you another examples (just trying to understand if its possible to do), Let's say a new product releases, and I make a model, which tells what to improve based on tweets from users on a 1 week timeline, like if the tweets say like the user is experiencing lags, the model should suggest like "you need to fix server lag to boost user retention" for this I need to fine-tune a llm right?

plain leaf
serene scaffold
# plain leaf lemme give you another examples (just trying to understand if its possible to do...

the thing that an LLM does is generate text that comes after initial text. For interactive LLMs, the thing that the user says is the initial text.

If you want it to start generating answers to questions differently than it does currently, you need to train it on examples of user interactions where it answers those kinds of questions. you need to have tons and tons of training data to do this.

serene scaffold
#

to be clear: you need so many tons of training data to do this, that it's almost always better to embed more information in the prompt.

eager horizon
#

usually how many viewmodels dose an app have?

plain leaf
#

Let's say I'm able to train such model. can I do the Twitter posts info retrieval in real time?

serene scaffold
eager horizon
#

viewmodels ie the thing after repositories

serene scaffold
eager horizon
#

and app application

serene scaffold
obsidian plume
#

hi so i am a beginner to all this and i thought of making a simple chapter wise question paper classifier it takes in a pdf made out of images of pyq of a particular subject and classifies it int chapter wise on providing the list of chapters in that chapter easy right! NO it isnt.

While trying to improve it, I encountered several challenges:

  1. My initial prototype worked because the physics paper was text-based without diagrams, but...
  2. The past year question (PYQ) papers are only available as scanned images.
  3. Converting these images to text is complex because they contain diagrams, chemical structures, and scientific notation that regular OCR cannot process.
  4. I considered using MathPix, but it wouldn't be effective for chemistry papers.
  5. Another challenge is handling bilingual content—questions appear in both Hindi and English. Even if I separate the English text, processing mathematical notation in the options remains problematic.

This is just the data preparation stage. After that:

  1. The text needs to be processed through an LLM for classification.
  2. Scientific notation needs conversion from MathPix's LaTeX format to readable text.
  3. Finally, the text needs formatting and PDF conversion.

So at this point i feel like it isnt worth it as the outcome isnt that much valuable if we compare the effort its taking so should i quit this projects and how to build something useful that actually is worth it?

also im new to all this just learned python last year im ok with pandas and numpy too dont know dbms and flask will work on it after exam.

plain leaf
plain leaf
weary timber
obsidian plume
#

can someone pls help me

serene scaffold
serene scaffold
obsidian plume
#

@serene scaffold yea thanks btw are you the person who made the pokemon card game neural network?

obsidian plume
#

@serene scaffold oh ok

pseudo tulip
#

Hi there

#

I'm new here

lapis sequoia
#

this is what chatgpt made 😭

austere prawn
#

4 knobs, let's start with 2 values each:
A: 1, 2
B: 64, 256
C: 0, 1
D: 8, 1024

So, 16 input combinations in total, each correspond to a scalar output value. I want to see what affect changing D from 8 to 1024 has. How to visualize? My intention was to pair up each input combination that has identical ABC inputs, compare the output of those two, and plot the resulting 8 values. Is there any plot that can help me do this grouping? I have the data in a pandas frame currently and just started using seaborne today. Catplot seems interesting, but can't figure how to utilize it for this. Any input?

gray slate
round rapids
gray slate
lapis sequoia
#

hold on lemme check the version as well

gray slate
#

Train it on the outputs of everyone and it'll be better than 50% of the people

lapis sequoia
#

GPT-4o

wooden hill
#

Ah.This place looks fun

spice ravine
#

which AI is best for math and physics

glacial root
#

these kinds of messages need to be restricted

#

as in they gotta be against the rules of this channel

serene scaffold
glacial root
#

when doing backpropagation for a simple feed forward neural network, i should set up a vector such that each term is the partial derivative of cost with respect to either a weight or bias, then once i have the vector, i should add the terms to their corresponding weights and biases and then check if it increases the cost or decreases it, then if it increases i subtract it instead and if it decreases then i go with adding it right (in either case i would multiply the vector by a learning rate that i choose depending on how far the vector is from 0)

#

honestly i'm kinda lost with backpropagation, not even the goat 3blue1brown could save me

#

and if i'm having trouble understanding 3blue1brown then i'm definitely fried

plain leaf
#

yo chat, where to find metal scrap image data, as in like the image should have minimal rust in it, which should be recyclable, i want to know how or to where to find source (paid or free)

small wedge
glacial root
#

also yeah i realized how messed up my approach was earlier lol

#

now i realized though, i need to calculate the gradient by backpropagating to get the partial derivative with respect to each weight and bias

small wedge
glacial root
#

and that learning rate is like the step we're taking right

small wedge
#

yes, it's one of the factors included in how big a step you take

glacial root
#

whatever it starts out as, from there we decrease it as we get closer to our minimum

#

i'm still failing to understand how to actually set up backpropagation

small wedge
#

if you're just learning about implementing backprop don't worry about decaying the learning rate, just consider it a constant step size

glacial root
#

yeah the learning rate part is pretty straight forward anyways, but my goal is to implement a full neural network

#

a pretty basic one though

#

it's for the mnist dataset

#

so essentially when we calculate the partial derivatives (find derivative and plug in the relevant values from what we have), that gives us the gradient right

#

but our gradient is what has the steepest slope

glacial root
small wedge
#

a single partial derivative will tell you how the function changes when you tune a single parameter, if your partial is positive you know you need to go down to decrease the cost and vice versa. The gradient is just what we call all of those partials together in a tensor (or set of tensors)

glacial root
small wedge
#

it the slope of the cost function for a single point over every trainable parameter in the model

glacial root
#

so pretty much what we do is we compute that gradient, then check to see if it increases or decreases our cost when we add it right

small wedge
#

the positive gradient (what you calculate using the chain rule) tells you the direction you need to go to increase the cost

#

so you just subtract those parameters instead and decrease the cost

#

no need to consider what the gradient actually says

glacial root
#

oh so that gradient will add to the cost

#

no matter what

#

and so we always just multiply it by the learning rate and then subtract it from our vector of weights and biases

weak delta
#

Whats a good book to master python from knowing basics
i heard about Fluent Python by luciano is that a good one or is there better
Like to write efficient good code + basically know inside out of python

glacial root
#

i'm thinking i should store all the weights and biases into one vector, and then have the gradient be in the same format so that they correspond to one another and i can just directly subtract, that's a good idea right?

glacial root
#

no book will replace doing practice problems and projects

grand breach
#

should I fine tune CLIP on dataset or instead use cross attention to improve accuracy on image captioning task ?

small wedge
pseudo lagoon
#

Hello guys I am new to ai can anyone recommend any sources from where I can start learning

dense needle
#

Or well the gradient is what it is but you don’t have to move in that direction

#

But the function changes by the most if you do

#

(So instead you move the opposite direction)

obsidian plume
dense needle
#

Also just to clarify because don’t think I explicitly said it— the gradient is the direction with the steepest slope

cedar sentinel
#

Greetings everyone. I have a very simple question yet so tricky. In the attached figure I created an end to end workflow of a model selection and evaluation. In principal, there's nothing wrong with it but the first split (to train/test sets) introduces bias although I bootstrap the test set in the final evaluation module. My question is: How can I do it robust ? If I repeat the exact same workflow 1000 times, I'll get a new "best configuration" and that's not what I want. I work with tabular data of 835 samples for a binary classification task with 80 features and imbalanced of 65-35 %.

#

Someone could argue that the 1st split (train/test) basically corresponds to reality and whatever the result is this should be reported.
Others could argue that the 1st split (train/test) might lead to poor scoring for the best configuration hence split was done once and sets might not be ideal.

olive obsidian
#

Hi, I'm trying to understand the use of numpy a bit better (in relation to ai/ml) and I often see something like: img = np.random.randint(<someting>); img.transpose((2, 0, 1)); and I'm trying to understand what the transpose() call really does.

From my understanding, in this case, it converts the pixels which are stored in memory like [r0,c0, r0,c1 ....]` (e.g. <r>=row, <c>=column, pixels are stored packed per row), into a planar format where the R, G and B values are stored as separate planes. Is that correct?

wooden sail
#

whenever possible, this is done only by changing the stride and not by rearranging the entries in memory

olive obsidian
wooden sail
#

idk what you mean with "as separate planes"

#

since numpy falls back on c to handle memory and what not, what is done is that the full required memory (rows * cols * size of each element) is allocated as a contiguous chunk. you then have two options: store the data in row major, or column major order. numpy uses row major by default

#

maybe this helps

olive obsidian
#

Ok I understand, I'll try to explain better.

Normally when you load/decode an image like a png or jpg, the pixels are stored in memory as r0,g0,b0,r1,g1,b1,r2,etc. However from what I've learned so far, the AI/ML worls uses pixels where they are stored/extracted, like: r0,r1,r2,r...for red, and b0,b1,b2 etc.

wooden sail
#

how you index them and how they are stored in memory are two separate things, btw

#

you usually don't need to care about how they are stored in memory

olive obsidian
#

In my case it is important how they are stored in memory because I'm loading them in C++ and feeding them into TensorRT.

wooden sail
#

ah in c++ you can choose this yourself

#

the first order you showed would be column major

olive obsidian
#

When I feed packed R0,G0,B0,R1 instead of planar R0,R1,R2, G0,G1, etc. the inference results are completely wrong

wooden sail
#

why do you call it packed

#

if you look at the image i shared, it's exactly what i showed there

#

just reading the data in one order or the other

olive obsidian
#

I call them packed/planar and not column/row major because I talk about how the bytes are stored in memory

wooden sail
#

i mean, row and column major refers exactly to how the bytes are stored in memory

#

that's precisely what the words are used for

olive obsidian
#

ok

wooden sail
olive obsidian
#

I also tried to focus on how the red, green and blue values are stored in memory. But ... from your first answer I think that they are already separated/planar.

#

and the .transpose() only flips the order like you said

wooden sail
#

transpose does not change the memory layout

#

it changes the stride only

#

the two things are completely separate. you can keep your memory layout as is and just change how you map the memory to a matrix

olive obsidian
#

Ah ofc. The reason why I was asking, is because I'm curious why they use transpose here:

def convert_onnx(net, path_module, output, opset=11, simplify=False):
    assert isinstance(net, torch.nn.Module)
    img = np.random.randint(0, 255, size=(112, 112, 3), dtype=np.int32)
    img = img.astype(np.float)
    img = (img / 255. - 0.5) / 0.5  # torch style norm
    img = img.transpose((2, 0, 1))
    img = torch.from_numpy(img).unsqueeze(0).float()
wooden sail
#

because of what the math is doing

olive obsidian
#

My guess was, that they want to show how to reprocess the input data.

wooden sail
#

not because of the memory layout

#

from the exact code you shared, it's not even needed. you could just directly create the array with the shape 3, 112, 112. but later on when the data is not randomly generated, it can make a difference

olive obsidian
#

yeah that's why I thought they were using transpose() to clarify something ... like how the preprocessed input for inference should look like

wooden sail
#

sure

olive obsidian
#

so that you can make sure that the memory layout in e.g. C/C++ is correct

wooden sail
#

still has nothing to do with memory layout

olive obsidian
#

not in python maybe, but in C you have to make sure the input data is preprocessed in such a way that the pixels in memory are as expected.

wooden sail
#

also no

#

you're mixing up mathematical objects with programming objects

#

you can store the entries of a matrix however you like in memory as long as you apply the math to them in the correct way

olive obsidian
# wooden sail also no

If "no" please tell me why remapping a loaded image into separate R,G,B planes gives me correct results when I feed it into a face detection model and that it doesn't work when I keep the pixels as is?

olive obsidian
#

but it's about what the model expects

wooden sail
#

it's because of how you wrote your code

olive obsidian
#

yes ofc 🙂

wooden sail
#

you made the two things the same, when they don't have to be

#

you could keep the memory layout the same and change the stride instead

olive obsidian
#

sorry, maybe I should have shared a bit more context

#

the thing is that I'm working with a .onnx model which I converted into a tensorrt engine. I use this model to learn about ai/ml and as a test I'm creating a face detection app.

#

so I load this model and want to feed images for inference into it.

#

what I found difficult is to figure out how to correctly preprocess the image data before feeding them into (any) model that expects images.

#

most repositories seem to share a python script which converts a pytorch model to onnx and I thought maybe those scripts share/explain how the data is supposed to look as they all look similar.

wooden sail
#

those scripts focus just on the "shape" of the data, e.g. that it's an m x n matrix

olive obsidian
#

ok thanks for explaining

limber belfry
#

Ill give you a code that is basically a tester for your model when i get home

glacial root
#

or is the vector we find not always exactly the gradient

gray slate
#

Part of this is "feature engineering" and part of it is model design, the architecture

left sapphire
#
with open('smallbatch.jsonl','r') as f:
    data = [json.loads(line) for line in f]
    df = pd.json_normalize(data)

df.head()

Hi, pandas / json question. Does anyone know why the json_normalize() function is failing to flatten after it gets a few levels down? (response.body.choices)

mental ether
#

any idea on rocm support on wsl vs nvidia setup to train a deep learning model ?

#

has 2 setup where one is old laptop with rtx 1060, another one with amd 7900 xtx. but from what i have been reading online, wsl setup on window with amd gpu is annoying ??

lilac lichen
#

hi guys. I am deciding about ml hardware, but pytorch and tensorflow requirements are not obvious. i am seeking for cheap variants and so cannot be sure about specific card being capable of running frameworks due to card being obsolete. how to check compatability properly?

glacial root
#

so model design is the setup of our multilayer perceptron right

#

as in how many layers we have and how many nodes in each layer

gray slate
# glacial root i see

Yeah but also the fact that you use the perceptron pattern, which parts are plumbed into each other, the flow of the information as gradient descent adjusts the loss landscape to shape to fit the overall function to the training data

glacial root
#

right now i'm just worried about getting the concepts down and trying a basic implementation from scratch, once i get backpropagation/gradient descent set up and have the algorithm which gives me a set of weights and biases that will give me a relative minimum cost, then i will look into all the ways i can improve the accuracy through hyperparameter tuning and improved model design

gray slate
#

I highly recommend "The Ancient Secrets of Computer Vision" for a deep primer on feature engineering and the sort of cool hacks that are used to build vision models. It's long, but it's a full course by the guy who wrote YOLO:
https://www.youtube.com/watch?v=8jXIAWg_yHU&list=PLjMXczUzEYcHvw5YYSU92WrY8IwhTuq7p&index=2

The Ancient Secrets of Computer Vision

https://pjreddie.com/courses/computer-vision/

An introductory course on computer vision originally held Spring 2018 at the University of Washington.

▶ Play video
glacial root
#

thank you, i'll look into it

gray slate
#

Something a bit shorter and a bit more direct:
https://www.youtube.com/watch?v=TkwXa7Cvfr8

A video about neural networks, function approximation, machine learning, and mathematical building blocks. Dennis Nedry did nothing wrong. This is a submission for #SoME3

Original vid: https://www.youtube.com/watch?v=0QczhVg5HaI

My Links
Patreon: https://www.patreon.com/emergentgarden
Discord: https://discord.gg/ZsrAAByEnr

Links and Content:
...

▶ Play video
tidal garnet
#

Does locally training any LLMs or any ml models (like say diffusion models) makes any sense?
Or is cloud the way to go?
Asking cause I wanna buy a new gpu. I am not a pro but much better than a total beginner. Would keep this in mind.
how much would i be able to do with say rtx 4070 (thats the max i can go). Or I should just stick to colab/kaggle?

merry ridge
#

I don't really train that many models so I'm not a very good source of an opinion here: I own a 3080 and I think it has the same amount of VRAM and more cores? It felt like a waste of time to me.

serene scaffold
#

If you can also use it for ML, yay

tidal garnet
#

I see. and i dont think and gpus are any good for that right?

serene scaffold
#

Good for what?

tidal garnet
serene scaffold
tacit sorrel
#

I legit cannot get even the quickstart to work and I want to make sure its not just me

iron basalt
#

Considering how difficult it is to get any Nvidia GPU at this point, it may be your only option.

#

(Other than using the cloud)

#

The key thing you would be looking for in a GPU is tensor core count, and VRAM (at least 16 GB, but you always want more).

#

Also not all generations are equal, they may have the same count, but tensor cores have improved a lot recently.

tidal garnet
iron basalt
tidal garnet
iron basalt
#

But it will probably be cheaper and get you further. However, this depends a bit, since there is a curve here. If you have enough funding to buy enough of them and basically become your own mini cloud it can be worth it again.

#

This also depends on if the cloud provider you pick is currently willing to lose (go negative) to attract users, in which case it would be a good deal for you and better than doing it yourself (and many cloud providers are currently doing this, waiting until everyone is locked into their services to increase the price).

#

Overall, probably go with cloud. It will probably be cheaper and they have the biggest, most modern GPUs (that are not even consumer GPUs, they are better than those).

tidal garnet
iron basalt
#

Main issue would be VRAM, since it's only 10GB.

#

(DDR6X)

tidal garnet
iron basalt
#

For reference, the 5090 is 32GB (DDR7). And the 3080 has about 272 tensor cores (older generation cores) while the 5090 has 680 modern ones.

iron basalt
#

For the price.

tidal garnet
#

I see.

#

then 3080 used would be the max

iron basalt
#

Nvidia likes to mess with their consumers a lot, you have to navigate their tricks.

merry ridge
#

If you are a university student, one option is to just ask your professors if they have compute power laying around and maybe turn it into a summer research project

iron basalt
#

Also the 4070 is not what you want, it's targeted at gamers.

#

Less tensor cores. It just has more VRAM for textures and models.

merry ridge
#

My department has a fair bit of resources that are mostly a polite request from a good student away from being made available to them

iron basalt
#

If your university has like a Nvidia workstation that is great (mutliple GPUs all interlinked).

#

(4 V100s interlinked, each 32GB VRAM, and 640 tensor cores)

tidal garnet
#

nah. I just graduated lol. been thinking to dive into ML again.

vital vessel
#

Hey, anybody online? I am self taught and don't know much about Python. I had to use a chromebook and webbrowser programming things like CodeHS to learn 😭 I just got an actual computer and I want to make JARVIS.

serene scaffold
vital vessel
#

Yeah, I just mean I want something with a similar concept

#

I know it's not gonna be nearly as good

#

I want something that I can talk to and get a verbal response. I would (preferably) like to have it voice activated but that's a big what if

#

Basically Glorified ChatGPT

#

I think it's called machine learning? Idk. I want it to be able to remember some stuff if that makes sense

serene scaffold
#

Glorified ChatGPT. You won't be able to create an interactive language model that's anywhere near as good as ChatGPT. Those models train for months with terabytes of training data on enterprise systems.

vital vessel
#

Again, just using these as examples lol

serene scaffold
#

You're currently trying to operate at level 100. You need to bring it way down to level 1.

vital vessel
#

fair enough

#

I had something that was working but it had limited commands

#

and I had to push a button before it would start listening

serene scaffold
#

A beginner project you could do is make a spam detector

#

Or something that decides if a picture is of a dog or a cat

vital vessel
#

Also, what can I use for these things? I have VSCode installed and I think I have the python extensions for it installed too, but idk how to tell if they work or not

serene scaffold
#

Vscode is just a code editor. You can use whatever code editor you want.

#

It has no bearing on how your code will run.

#

Just don't install anaconda

vital vessel
#

hahaha, why?

serene scaffold
#

They've been gaslighting ml people into thinking it's still relevant

vital vessel
#

oh

serene scaffold
#

I'm signing off now.

#

Don't do anything bad

vital vessel
#

okay lol

#

I'll ask around and try to learn some more

#

thanks for the help

serene scaffold
#

I'll probably be back in like nine hours

vital vessel
#

alright

glacial root
#

trust me, we are no where close to recreating jarvis lol

#

not just us, mankind as a whole

#

what i'm doing right now and what i think you should do as well, is implementing a basic feed forward neural network using just numpy

#

and pandas but only to parse the data and get it into a numpy array, nothing else

#

before that probably learn some basics of linear algebra and multivar calc though

#

and then the rest you could probably learn as you go

gloomy swan
#

If anyone is looking to get some open-source experience with AI Engineering and LangChain, I have a repo which has some issues to tackle, probably more intermediate than beginner-level stuff.
https://github.com/GGyll/condo_gpt

In the readme there is a video that explains the project in case you like visual explanations 🙂

GitHub

An intelligent assistant for querying and analyzing real estate condo data in Miami. - GitHub - GGyll/condo_gpt: An intelligent assistant for querying and analyzing real estate condo data in Miami.

brisk bay
#

does anyone know a fix for PIL UnidentifiedImageError?

#

basically a lots of images in my dataset are corrupted and I can find a way to ignore corrupted images in dataset during testing loop

past meteor
odd meteor
ornate latch
#

Guys anyone interested in doing some deep learning projects with me?
I am learning so yeah if anyone would like to join in guiding the workings of DL architectures & other stuff.

gloomy swan
thorny zealot
#

How much data science should you learn before learning machine learning?

woeful escarp
#

Hello, I am starting in ML, I would like to work in a project to improve, send me DM

glacial root
lament warren
#

Hi, I'm working on a small project to approximate polynomial function using tensorflow.

I use 30000 datapoints from x = [-1, 1] and use the polynomial to create the corresponding y dataset

I then create a model using this general format

model = tf.keras.Sequential()

model.add(tf.keras.Input(shape=(1,)))

model.add(Dense(12, activation= 'relu'))

model.add(Dense(1, activation='relu'))

This is just as an example

I train it at 20 epochs with batch size 12 with validation data (data is split in 30% training, 20% validation and 50% testing)

It takes about a minute to train the model, is this normal?

opaque condor
opaque condor
hearty depot
opaque condor
glacial root
#

like convolutional and recurrent

#

also by the way i got an implementation of the gradient function working, i'm still not sure how the numpy method for gradient works

#

cause it doesn't give us the individual changes for each weight and bias that we need to make

hearty depot
glacial root
#

also yeah i wrote my own

glacial root
#

UnboundLocalError: cannot access local variable 'hl2_to_output_weight' where it is not associated with a value

#

does this mean out of bounds

serene scaffold
viral wadi
#

I need help

#

whenever i use import cv2 or whatever i am importing it says module not found

serene scaffold
viral wadi
#

how am fix

serene scaffold
#
import sys
print(sys.executable)

add that to your code to see which python your code is using

viral wadi
#

@serene scaffold

serene scaffold
# viral wadi

please always copy and paste text directly--don't ask people to read screenshots of text

viral wadi
#

oh sorry

serene scaffold
#

what did you do to install cv2?

viral wadi
#

wym

#

im new to python

serene scaffold
#

you get an import error when you try to import cv2, right?

viral wadi
#

btw

#

yh

serene scaffold
#

what did you do to install cv2?

viral wadi
#

i do not understand

#

i did import cv2

serene scaffold
#

you have to install cv2. it doesn't come with python.

serene scaffold
# viral wadi

please give the text in this screenshot. I need it for something.

glacial root
viral wadi
#

then how do i run it on someone elses computer without them knowing

#

🥀

serene scaffold
serene scaffold
viral wadi
#

😊

#

they can know whats running idc

#

but i need to test my webcam and part of my script is screwed

serene scaffold
viral wadi
#

ok but can i edit out the nane of my pc

#

bc its embarrassing

serene scaffold
viral wadi
#

ok

#

what the debug said or what i typed in

serene scaffold
viral wadi
#

ok

serene scaffold
#

@glacial root still there?

glacial root
arctic wedgeBOT
glacial root
#

should i click the check

serene scaffold
#

It said please

glacial root
#

or is this fine

serene scaffold
#

which line causes the error?

viral wadi
#

visual studio

glacial root
#

one sec i'll send a screenshot of the entire error

viral wadi
#

PS C:\Users\pcname\Downloads> & 'c:\Program Files\Python313\python.exe' 'c:\Users\pcname.vscode\extensions\ms-python.debugpy-2025.4.0-win32-x64\bundled\libs\debugpy\launcher' '59458' '--' 'C:\Users\pcname\Downloads\import sys.py'

serene scaffold
hearty depot
#

can u do pip list?

#

in terminal?

viral wadi
#

yh

glacial root
#

oh then i'll copy and paste it

#

UnboundLocalError Traceback (most recent call last)
Cell In[11], line 8
6 if array_max > max:
7 max = array_max
----> 8 gradient_descent(cost_gradient, max)

Cell In[9], line 3, in gradient_descent(cost_gradient, max)
1 def gradient_descent(cost_gradient, max):
2 if max > 1:
----> 3 gradient_descent_step(cost_gradient, 0.01)
4 elif max > 0.0001:
5 gradient_descent_step(cost_gradient, 0.001)

Cell In[8], line 2, in gradient_descent_step(gradient_vector, learning_rate)
1 def gradient_descent_step(gradient_vector, learning_rate):
----> 2 hl2_to_output_weight = hl2_to_output_weight - (learning_rate * gradient_vector[0])
3 output_bias = output_bias - (learning_rate * gradient_vector[1])
4 hl1_to_hl2_weight = hl1_to_hl2_weight - (learning_rate * gradient_vector[2])

UnboundLocalError: cannot access local variable 'hl2_to_output_weight' where it is not associated with a value

serene scaffold
#

@viral wadi okay, do this command.

'c:\Program Files\Python313\python.exe' -m pip install opencv-python
viral wadi
#

ok

#

didnt work

#

invalid syntax

#

wtf

hearty depot
#

also @viral wadi
i recommedn using wsl in the future it will make life easier

serene scaffold
viral wadi
#

ok good

glacial root
#

also can you tell me just enough to give me a slight hint

serene scaffold
serene scaffold
viral wadi
#

The filename, directory name, or volume label syntax is incorrect.

glacial root
#

the way i said it earlier may have come off as a bit rude

viral wadi
#

WTF

serene scaffold
#

@glacial root

def gradient_descent_step(gradient_vector, learning_rate):
    hl2_to_output_weight = hl2_to_output_weight - (learning_rate * gradient_vector[0])
    output_bias = output_bias - (learning_rate * gradient_vector[1])
    hl1_to_hl2_weight = hl1_to_hl2_weight - (learning_rate * gradient_vector[2])
    hl2_bias = hl2_bias - (learning_rate * gradient_vector[3])
    input_to_hl1_weight = input_to_hl1_weight - (learning_rate * gradient_vector[4])
    hl1_bias = hl1_bias - (learning_rate * gradient_vector[5])

It looks like you're trying to change global variables in a function, but that's not how it works.

viral wadi
#

@serene scaffold

#

its not working

serene scaffold
glacial root
viral wadi
#

the error is "The filename, directory name, or volume label syntax is incorrect."

glacial root
#

dude

serene scaffold
glacial root
opaque condor
viral wadi
#

i closed it so ill redo it

glacial root
#

but there are no objects here

serene scaffold
#

@viral wadi if you run code and it causes an error, I need to see the whole code and the whole error.
if you run a powershell command and it causes an error, I need to see the command and the whole error.
always send both parts in the same message.

viral wadi
#

C:\Windows\System32>-m pip install opencv-python
'-m' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\System32>

glacial root
#

i'm not gonna lie i kind of forgot about objects, it's been a while since i've worked with java and in python i haven't really worked with classes

#

but i see the issue now

serene scaffold
hearty depot
viral wadi
#

I tried that too

#

C:\Windows\System32>'c:\Program Files\Python313\python.exe' -m pip install opencv-python
The filename, directory name, or volume label syntax is incorrect.

serene scaffold
viral wadi
#

ok

#

C:\Windows\System32>'C:\Program Files\Python313\python.exe' -m pip install opencv-python
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\System32>

#

@serene scaffold

serene scaffold
viral wadi
#

i no no wanna get ratted

#

ok then

serene scaffold
#

idk what you mean by ratted

#

most developers use a bash console, not powershell.

viral wadi
#

ok

serene scaffold
#

I don't know enough about powershell to keep helping you.

hearty depot
#

@viral wadi if u just need to script and dont want to deal w windows environemnt other option is to juse use colab

serene scaffold
delicate apex
hearty depot
serene scaffold
#
# creates a numpy array object and assigns it to that variable
hl2_to_output_weight = np.random.randint(-5, 5, (10, 15))

# creates a new object and overwrites the original variable, but only for the current functions
hl2_to_output_weight = hl2_to_output_weight - (learning_rate * gradient_vector[0])
viral wadi
#

"how to rat someones pc and delete system 32😊"

#

@serene scaffold

serene scaffold
# viral wadi

idk what could have caused that. you could try using google colab instead.

serene scaffold
viral wadi
#

i got it

#

i had to do the easiest thing ever

serene scaffold
#

great.
open cmder and type which python

viral wadi
#

is it supposed to be transparent

serene scaffold
#

doesn't matter

glacial root
viral wadi
#

λ which python
/c/Program Files/Python313/python

viral wadi
#

stelercus what happen

glacial root
#

so should i just not use a function

viral wadi
#

λ which python
/c/Program Files/Python313/python

#

@serene scaffold

glacial root
#

chill

#

give him time lol

viral wadi
#

NO

serene scaffold
#

YES

viral wadi
#

ok

glacial root
serene scaffold
#

okay, do python -m pip install opencv-python

glacial root
#

i find that wild

opaque condor
#

I know somebody already I commented but I still understand the equations it's just my brain is it comprehending what's the error

viral wadi
#

please be quiet mechanical fox

glacial root
#

bro what

#

you are not the only human being in this chat

serene scaffold
viral wadi
#

oh

glacial root
#

...

viral wadi
#

when will you help me

#

stelercus

glacial root
#

bro...

serene scaffold
glacial root
#

if you don't mind me asking

#

how old are you

#

@viral wadi

viral wadi
#

ty

#

and i do mind you asking

#

where can i go to learn python

#

does duolingo have it

serene scaffold
viral wadi
#

:C

serene scaffold
#

@viral wadi in cmder, do python -m pip install opencv-python

viral wadi
#

i did

serene scaffold
#

okay, what were the last few lines of the output?

viral wadi
#

Successfully installed numpy-2.2.3 opencv-python-4.11.0.86

[notice] A new release of pip is available: 24.3.1 -> 25.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip

serene scaffold
viral wadi
#

uhhhh wdym

#

like you mean a text py file

glacial root
#

but the reason i was asking

#

was that i just want to let you know

#

you gotta be more patient

#

and you gotta understand that others are people as well

serene scaffold
#

whatever folder it's in, you need to use the cd command to go to it

viral wadi
#

ok ill make one

#

downloads

serene scaffold
#

so it might look like cd C:\Program Files\my_stuff\example
and then once you're there, you do python the_code.py

#

where the_code.py is your python file.

#

I'm going to have dinner, so I'll be back later.

viral wadi
#

ok bye

#

its confusing what do i swap the mystuff and example with

glacial root
#
condition = True
while(condition):
    cost_gradient = gradient_cost()
    max = 0
    for parameter_array in cost_gradient:
        array_max = np.max(np.absolute(parameter_array))
        if array_max > max:
            max = array_max
    if max > 1:
        hl2_to_output_weight = hl2_to_output_weight - (0.01 * cost_gradient[0])
        output_bias = output_bias - (0.01 * cost_gradient[1])
        hl1_to_hl2_weight = hl1_to_hl2_weight - (0.01 * cost_gradient[2])
        hl2_bias = hl2_bias - (0.01 * cost_gradient[3])
        input_to_hl1_weight = input_to_hl1_weight - (0.01 * cost_gradient[4])
        hl1_bias = hl1_bias - (0.01 * cost_gradient[5])
    elif max > 0.0001:
        hl2_to_output_weight = hl2_to_output_weight - (0.001 * cost_gradient[0])
        output_bias = output_bias - (0.001 * cost_gradient[1])
        hl1_to_hl2_weight = hl1_to_hl2_weight - (0.001 * cost_gradient[2])
        hl2_bias = hl2_bias - (0.001 * cost_gradient[3])
        input_to_hl1_weight = input_to_hl1_weight - (0.001 * cost_gradient[4])
        hl1_bias = hl1_bias - (0.001 * cost_gradient[5])
    elif max > 0.00000001:
        hl2_to_output_weight = hl2_to_output_weight - (0.0001 * cost_gradient[0])
        output_bias = output_bias - (0.0001 * cost_gradient[1])
        hl1_to_hl2_weight = hl1_to_hl2_weight - (0.0001 * cost_gradient[2])
        hl2_bias = hl2_bias - (0.0001 * cost_gradient[3])
        input_to_hl1_weight = input_to_hl1_weight - (0.0001 * cost_gradient[4])
        hl1_bias = hl1_bias - (0.0001 * cost_gradient[5])
    else:
        condition = False```
#

@serene scaffold this is my function now

#

how long can i usually expect this to take to run

#

so far it's been like at least 2 minutes and my computer sounds like a fan lol

serene scaffold
glacial root
#

cause it would have to recalculate the loss every time right

#

though that takes like 5 seconds

serene scaffold
glacial root
#

but now i changed that and am having it print every time

serene scaffold
#

printing it every time will be annoying for the human

hearty depot
glacial root
#

one sec i'll send the code

#

oh wait it goes over the limit

#

i'll use that github thing to send code, i forgot what it's called

glacial root
#

also i'm doing this on jupyter notebook

serene scaffold
#

I'm winding down for the day, so I probably won't be answering questions in the immediate future.

hearty depot
glacial root
#

i see

#

oh wait i remember what it's called now

#

github gist

#

this is the code for it

#

only the first element in the cost vector has been going down

#

and very slowly, except for one time when it just shot down and then went back up to relatively where it was before

hearty depot
glacial root
#

i'm taking an average though

#

average across all training examples

#

also perhaps the reason why it's so slow is cause i'm using a cpu

hearty depot
glacial root
#

do you guys usually pay for a gpu

glacial root
#

it doesn't really make too much of a difference though right

hearty depot
#

it does tho

#

ur supposed to have the loss for mse as a scalar and not doing his impacts

#

backprop

glacial root
hearty depot
#

yes, u should get the partial after u get mse
in fact a lot of modern ml liubraries dont let u call backwards() unless the tensor is a a scalar

glacial root
hearty depot
glacial root
past meteor
iron basalt
glacial root
glacial root
#

setting up a neural network without numpy would be diabolical

iron basalt
#

Also you don't really compute these things in separate passes always. It's like if you add 2 to every value in an array and then multiply it by 3. You could do this in a single loop. But what you are doing is like having a loop that adds 2 to each value, and then another after that multiplies them by 3.

glacial root
#

and yeah i cut down the batch size from 50k to 5k training examples

iron basalt
#

See if you can combine loops into one.

#

Do things all at once when you have the info right there.

#

Note that this separate loops stuff still happens when using numpy, just it's hidden.

glacial root
#

yeah that's what i did

iron basalt
#

And it's why it's slower than doing it in plain C still.

glacial root
#

like with setting up the layers and the cost function

glacial root
#

same for backpropagation wherever i could

iron basalt
#

Even though numpy is not optimal it's so much faster than pure Python that it does not really matter.