#data-science-and-ml
1 messages ยท Page 126 of 1
imagine you have a regression line x - 2. If it's above 0 the prediction is + and below it's -.
So, when x is 0 the prediction is -. How would you do this without a bias term?
idk it's hard to explain because it's quite intuitive if you don't overthink it ๐
still, what if all inputs are 0
what will you propagate?
What is the point of bias here , we have our prediction right?
it'll output 0 and especially if you take regression and not classification examples theres 10000000s of examples where an input of 0 does not mean an output of 0
Say you pick relu
what you propagate is the gradient of the loss evaluated at the point, and some activation funcs do give 0 if the input is 0. i'm not sure either of those are good arguments to why a bias is used
probably better to just think of it as getting extra degrees of freedom. one way of reinterpretting the bias is to embed the original input in one dimension higher and then doing something like a rigid transformation or a shear in N+1 dimensions
it's the simplest way of getting a nonlinear effect in N dimensional space, too
those aside, the choice of threshold is the simplest explanation
The non-math answer of "if your input is zero, should your output be zero" is also fine imo
Like, what's the mean net worth of a baby
should it though? classifier networks never do that. if your output is to be interpreted as probabilities of a categorical distribution, you don't get 0 as an output for an input of 0s
stuff like that
If you have a softmax you can say "should each class be equiprobable for an input of 0"?
I mean you're definitely right though
but the question was "why" from the beginning
more > less ๐
that's what we're discussing ๐ "what" it is that it's doing
zestar just gave a good example where you might not want to get a uniform distribution out of a uniform input, but a linear transformation can't do that
you can turn Ax + b into a linear transformation if you like too, but only in a dimension of N+1 or higher
Could we say that bias is more of a starting point for our model?
not really no, it's usually initialized as 0
in some sense, sure
I'd say yes
you remember all those + C's you get in differential equations and integral problems?
you find that + C from your initial and boundary conditions, or other constraints
same thing here
Imo I'd say yes but it's also a wrong way to look at it
You have to stare to regression coefficients for this one
Like, econometrics style
then this stuff sinks in (from an applied pov at least)
Hmm i guess it's topic to research about
but you can make Mx do the same as Mx + b if you add another dimension to M
that'd be my preferred argument tbh
So a 2d point becomes 3d?
you can extend M into [M b] and x into [x 1]
(that's also how affine transformations are implemented a lot)
that turns the affine transformation in N dimensions into a shear in N+1
it doesn't, it addresses matiiss'
i'd imagine so if you use layers that don't map 0 to 0 or generally aren't monotone
simplest way of moving stuff around
import torch.nn as nn
import torch.nn.functional as F
class LaneDetectorCNN(nn.Module):
def __init__(self):
super(LaneDetectorCNN, self).__init__()
# conv2d ( input, output, kernel, stride )
self.conv1 = nn.Conv2d(3, 16, 3, 1)
self.conv2 = nn.Conv2d(16, 32, 3, 1)
self.conv3 = nn.Conv2d(32, 64, 3, 1)
# so here output from conv3 which is 3D is getting converted into 1D
self.fc1 = nn.Linear(64 * 14 * 14, 128)
print(self.fc1.shape)
self.fc2 = nn.Linear(128, 512)
def forward(self, x):
x = F.relu(self.conv1(x))
x = F.max_pool2d(x, 2, 2)
x = F.relu(self.conv2(x))
x = F.max_pool2d(x, 2, 2)
x = F.relu(self.conv3(x))
x = F.max_pool2d(x, 2, 2)
x = x.view(-1, 64*14*14)
x = F.relu(self.fc1(x))
x = self.fc2(x)
return x
# -> for conv
# output_size = ( Input_size - Kernel_size + 2 * Padding / stride ) + 1
# -> for max pooling
# output_size = Input_size / stride
class Decoder(nn.Module):
def __init__(self):
super(Decoder, self).__init__()
# Transposed convolutional layers for upsampling
self.tconv1 = nn.ConvTranspose2d(64, 32, 3, stride=1)
self.tconv2 = nn.ConvTranspose2d(132, 16, 3, stride=1)
self.tconv3 = nn.ConvTranspose2d(16, 3, 3, stride=1)
def forward(self, x):
x = F.relu(self.tconv1(x))
x = F.relu(self.tconv2(x))
x = self.tconv3(x)
return x
how it is now? correct or not?
but one thing to be noticed here is,
after feature extraction part in encoder!!, those features are passed to fully connected layers, so we have to flattened the input first then!!
@final kiln
I was thinking to download TuSimple dataset and then train my model, what do you think?
so it's fast process now!
What kind of hardware are you using for training?
ryzen 3 3200g
shit!!
estimation is 16 hours by GPT
Im using a 4090 its really slowing down around the 10 epoch. This is the first time Ive tried training anything
what are you training?
the dataset TuSimple is 25 gb
so on 3060 it is approx.. 100 minutes
I combine the power of VQVAE and CLIP for image reconstruction and aligment with textual descripts
Its really starting to take shape
Im going to add coming but it needs to run greyscale for a bit
Im training it on the flickr30k dataset
You aint buying it or what?
Hi, I have object detection model which returns such resoult how can i extract bbox from such output shape?
Which object detection model?
how about above code?
RuntimeError: shape '[1, 64, 2, 2]' is invalid for input of size 512```
okay sorry for that!!, I was just curious
why this for decoder?
always follow experts!
come on let's focus on
problem now
I have created now decoder but
x_chw = encoder_output.view(64, 2, 2)
x_chw = encoder_output.reshape(1, 64, 2, 2)
I am not able to understand now this error
should we try -1 so that it will automatically do that stuff
again same error
ohhh
how can I download this paper?
what for this then?
That's my improved error message
so in encoder the output shape is 1, 512
so we convert this to do upsampling
hey it's vector
then we need to create tensor like matrix
where?
before decoder's conv
yeah
in decoder?
x = F.relu(self.fc1(x))
x = self.fc2(x)
first of of , why on second fc there is no relu function applied?
need to delete then
ahh, now it is getting worse, we are only swapping some codes not getting any output
we go from resnet to cnn
we need to focus now
ignore chat gpt, I am just asking some question to it
then how to reshape this
encoded output
also is there any need to add ReLU function in second fc??
do we need labelled data for that?
self.fc1 = nn.Linear(64 * 14 * 14, 128)
self.fc2 = nn.Linear(128, 512)
```I need to revise this thing now
so from last layer of conv2d, we have 64 feature maps of size 3x3, with stride of 1
right?
so what is 64 * 14 * 14
what is 14 doing here?
class Decoder(nn.Module):
def __init__(self):
super(Decoder, self).__init__()
self.fc1 = nn.Linear(512, 128)
self.fc2 = nn.Linear(128, 64 * 14 * 14)
# Transposed convolutional layers for upsampling
self.tconv1 = nn.ConvTranspose2d(64, 32, 3, stride=1)
self.tconv2 = nn.ConvTranspose2d(132, 16, 3, stride=1)
self.tconv3 = nn.ConvTranspose2d(16, 3, 3, stride=1)
def forward(self, x):
x = F.relu(self.tconv1(x))
x = F.relu(self.tconv2(x))
x = self.tconv3(x)
return x
good?
yeah I am doing that now
x = x.view(-1, 641414)
what this line do?
converting 641414 into 1d plane?
I mean vector??
so how can I reverse that?
in encoder ( forward method)
class Decoder(nn.Module):
def __init__(self):
super(Decoder, self).__init__()
self.fc1 = nn.Linear(512, 128)
self.fc2 = nn.Linear(128, 64 * 14 * 14)
# Transposed convolutional layers for upsampling
self.tconv1 = nn.ConvTranspose2d(64, 32, 3, stride=1)
self.tconv2 = nn.ConvTranspose2d(132, 16, 3, stride=1)
self.tconv3 = nn.ConvTranspose2d(16, 3, 3, stride=1)
def forward(self, x):
x = x.reshape(64, 14, 14)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = F.relu(self.tconv1(x))
x = F.relu(self.tconv2(x))
x = self.tconv3(x)
return x
good?
yeah make sense now
run the whole thing and got same output
RuntimeError: shape '[64, 2, 2]' is invalid for input of size 512
torch.Size([1, 512])
from encoder's output
whole?
x_chw = encoder_output.reshape(64, 2, 2)
after getting encoder's output
heh?
lemme give yoou code first
give me paste bin
yeah now new error
RuntimeError: mat1 and mat2 shapes cannot be multiplied (256x2 and 512x128)
hmm lemme think
from where that matrix 256x2 came?
lemme give you full code then
yeah I am doing that
encoder = LaneDetectorCNN()
encoder_output = encoder(input_image)
print(encoder_output.shape)
# so here we are converting simple 1d vector (output) into tensors
# so 32 channels tensors size of 4x4
# x_chw = encoder_output.reshape(64, 2, 2)
# now we will pass this to another t_conv to generate image
decoder = Decoder()
decoder_output = decoder(x_chw)
??, can't understand
shit typo
RuntimeError: Given transposed=1, weight of size [132, 16, 3, 3], expected input[1, 32, 16, 16] to have 132 channels, but got 32 channels instead
Is Cs degree required to job in it or no ?
recommendable!!, but not so if you have skills!
there are bunch of people who are from mechanical background now shifted towards software
not for now!!
I'm from buisness background should I get into it or no
expected 132 channels but got 32 , whoaaa
it depends on you skills then!
which degree currently
??
if you have interest then you can obviously, but first ask yourself!!
people have shifted from commerece background also!
for what?
to learn coding for eg which language should I focus on
Mine, converted to rknn format
I would say again , first find interest or atleast meet those people, then you will get my point
I can send that model in onnx format and in rknn format if you want
Ok Bro
hey @final kiln
GPT is still saying you don't need a fc layers in decoder if you are using transpose2d layer
Then where is your dataset from, the format of the labels should tell you how to interpret the output
!rule gpt
It's not a reliable source of info, so much that it's banned to use it here for answering questions
ahh, he is calling ambulance now!
Wait i will send you a link because it's public model which i just converted to onnx fromat with different output shape to make it fit for rknn converter
Thats the model which i used
Than i used onnxruntime with small change in its code
3, 3 size of that matrix?
they are already I guess so?
self.conv1 = nn.Conv2d(3, 16, 3, 1)
self.conv2 = nn.Conv2d(16, 32, 3, 1)
self.conv3 = nn.Conv2d(32, 64, 3, 1)
# so here output from conv3 which is 3D is getting converted into 1D
self.fc1 = nn.Linear(64 * 14 * 14, 128)
self.fc2 = nn.Linear(128, 512)
this from encoder
So i converted the model which had output shape of float32[1,5,8400] to model which has shape as on img below float32[1,1,80,80,65]
self.fc1 = nn.Linear(512, 128)
self.fc2 = nn.Linear(128, 64 * 14 * 14)
# Transposed convolutional layers for upsampling
self.tconv1 = nn.ConvTranspose2d(64, 32, 3, stride=1)
self.tconv2 = nn.ConvTranspose2d(132, 16, 3, stride=1)
self.tconv3 = nn.ConvTranspose2d(16, 3, 3, stride=1)
and this from decoder
Than i converted that onnx with 5D shape to rknn model
I know it's a bit complicated but there are no other way to do it
@small wedge so i did like 3 steps to get to that final model which is in rknn format
congrats we created a CNN
torch.Size([1, 512])
torch.Size([3, 20, 20])
what is this now ,
3 channels, and 20x20
on what basis?
they are already 3x3
then which value? 5?
and on max_pool?
in forward?
it's 2
x = F.relu(self.conv1(x))
x = F.max_pool2d(x, 2, 2)
torch.Size([1, 512])
torch.Size([3, 26, 26])
this is not making sense to me
for reversing?
to convert feature_maps into a proper imag?
torch.Size([1, 512])
torch.Size([3, 71, 71])
good ?
torch.Size([1, 512])
torch.Size([3, 131, 131])
how much we want
128?
then we got 131
no I got 218
for kernel size of 39
let's keep that as it is
why now?
out input image was of 3,128,128
so why output for 131?
which loss?
to use?
cluster loss function?
hehe? where?
3 represents RGB?
why to 1?
ohh!! then it's what
ohhhhh
so how to be on that 1 shape
so it's fixed now!
can't we plot the output image??
then we will keep that loss and stuff
hey what about dataset?
do we need labelled dataset for this?
I am ready to manually label this ( only 10)
wait quick question
import torch.nn as nn
import torch.nn.functional as F
class LaneDetectorCNN(nn.Module):
def __init__(self):
super(LaneDetectorCNN, self).__init__()
# conv2d ( input, output, kernel, stride )
self.conv1 = nn.Conv2d(3, 16, 3, 1)
self.conv2 = nn.Conv2d(16, 32, 3, 1)
self.conv3 = nn.Conv2d(32, 64, 3, 1)
# so here output from conv3 which is 3D is getting converted into 1D
self.fc1 = nn.Linear(64 * 14 * 14, 128)
self.fc2 = nn.Linear(128, 512)
def forward(self, x):
x = F.relu(self.conv1(x))
x = F.max_pool2d(x, 2, 2)
x = F.relu(self.conv2(x))
x = F.max_pool2d(x, 2, 2)
x = F.relu(self.conv3(x))
x = F.max_pool2d(x, 2, 2)
x = x.view(-1, 64*14*14)
x = F.relu(self.fc1(x))
x = self.fc2(x)
return x
# -> for conv
# output_size = ( Input_size - Kernel_size + 2 * Padding / stride ) + 1
# -> for max pooling
# output_size = Input_size / stride
class Decoder(nn.Module):
def __init__(self):
super(Decoder, self).__init__()
self.fc1 = nn.Linear(512, 128)
self.fc2 = nn.Linear(128, 64 * 14 * 14)
# Transposed convolutional layers for upsampling
self.tconv1 = nn.ConvTranspose2d(64, 32, 40, stride=1)
self.tconv2 = nn.ConvTranspose2d(32, 16, 40, stride=1)
self.tconv3 = nn.ConvTranspose2d(16, 3, 40, stride=1)
def forward(self, x):
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = x.reshape(64, 14, 14)
x = F.relu(self.tconv1(x))
x = F.relu(self.tconv2(x))
x = self.tconv3(x)
return x
should I apply that ReLU to that remaining layer?
x = self.fc2(x)
here we have not applied?
how many images should I label?
hey come on!
that was 25 gb
wait I found one with 262mb
what about comma2k19?
developed by comma.ai
๐
suggest fast dataset!!
they are in GB's
and I am still searching
it will take time to upload on gdrive then
or I should run the code on local?
okay comma2k19 then
just take a look at their labels!!
https://huggingface.co/datasets/commaai/comma2k19
are labels good?
or we just need 2 lines for lanes?
EDA?
one dataset I found which has 2 seperate dir, one contains image and another it's labels
can I only download specific part of whole dataset?
I like curved lane dataset
how can I download this
okay got it
how can we combine labels and images??
how much will take to train??
it is total 40gb data
okay now going to sleep!!
Wow after about 25 epochs its working well.
Whoa...
Is this uncommon to get these kind of results from 30 epochs?
Dude this is wild.. it started with abstract shapes then refined that, all of sudden one epoch BOOM , now we have color.
What do you guys think?
you are trying to call a integer instead of a function?
nvm....
i found the mistake
im stupid
What was it. No, you're not, I dont know you but using python probably doesnt make you stupid. Anyways, what was the issue, I wanna learn too ๐
wait my laptop giving me issues while im training the neural network
give a sec
ok
Mistakes are part of learning.
so why does everyone scale standard deviations by the square root of time when they can convolve the probability mass function and actually do it right
I remember when I learned that convolving distributions yields their accumulation and I was like so I've been misled
As a rule:
data science <=> doing things right
so it seems, so it seems
Could anyone recommend a library or something thats good for visualizing dataflow through the model? I would like to ideally see the gradients too (like an image where each pixel is a weight, alongside an image where each pixel is the derivative for the weights given the input and target output). Any suggestions? If nothing then anything that would be a good starting point to fork?
isn't that what airflow is for
Isnt airflow for distributing workload? Thats what I see in the pytorch docs anyway ยฏ_(ใ)_/ยฏ
It's a platform to "author schedule and monitor workflows"
monitoring involves visualization I'm pretty sure
Well I can't find anything for it, just logs etc
It does look like a general overview, but not really showing the data/weights/gradients as images
What you described seems pretty intricate but I think you might be able to leverage the listeners to get that data and render visualizations yourself using matplotlib or something
How much time it took ?
Around 13 hours on a 4090 11700k
What do you mean?
Its a collection of images with association captions. Its over 31k images and captions depicting the image.
Now make sense
you can go to the Files and versions tab and see what files it got
rows is just how many images there are pretty much
In includes other meta data, but thats all im using.
Yeah I am on mobile , it lags on larger files
Then it will take 'days' to train on cpu
yeah, don't train on a CPU
My frnd has 3060
Heres where its at on the training currently.
what GPU do you have?
msi 4090
wait wait wait, did you not split the dataset for training and evaluation?
No I did.
did you split it 50/50?
paperspace
Free??
no, but it's pretty cheap
How much
Your right, I didnt do it the proper method. Whys it working so well though?
Its not underfitting or verfitting and its obviously learning lol
cheapest paid GPUs are ~55 cents an hour
though occasionally there are free GPUs available as well
(if you pay for the 2nd tier subscription (1st/default is free) which is 8 bucks a month, then there are more GPUs to choose from, so more likely to have a free GPU available)
either way, it's not like you'd be constantly using them, you build the model, prep everything on the CPU and then when you're ready put it on cloud to train
well, you don't know if it's overfitting or not because you are validating the exact data it's training on
Well back to square one
also may I suggest plotting those metrics
gotcha
Im going bonkers trying to get that dataset split for train and test and validation? Does this look right?
Im confused why I cant use train or val only test.
wdym?
huh, did you specify train_size?
did you read the docs for what split does?
I mean, it's optional in the first place
Hey , I am a newbie in data scinece ,does any one knows where i have to begin in learning data science
Ya it does look hella suss haha
it doesn't look sus... the package is simply using the interface that you have defined
it's basically a callback
well, one place might be a university
you might want to begin by learning Python though
otherwise see the pinned messages in this channel
Hows it look fellas?
shit! i forgot the train size
Will that matter though?
Nevermind I read its calculated as a complement to test size, train size that is.
It definitely seems much more random now.
looks great
Ok so I retreated to building a script try some brute force random hp search
I need a super computer , lol
i created my own NN from scratch and it did just fine (on the MNIST data set)
One of the instructions from the guide asked us to take a look at what the neurons were learning (in particular the input to the first hidden layer), so i plotted the weights of each neuron of the hidden layer
The image from the guide is the one on the top, what i got is the one on the bottom
did i do this right? it seems like my NN's plot of its weights looks like whitenoise to me with a bit of patches
Hello. SO i want to create an Ai that takes in a string of letters and outputs an output such as numbers with 2 decimal places. What might be a good idea to do this?
You dont need "AI" to create this
could you explain?
๐ interesting
just python lol
you dont need to create "AI" to make that
python is a language.
What method
are you thinking about is what i mean
can u explain a little bit more what are you trying to create
I want to create soemthing that takes a scramble for a rubik's cube such as below:
" B' R D2 R' F2 R' F2 R B2 R2 D2 U2 R' D L D F R2 F2 D2 U' "
and outputs a time. that is within .5 of the time i actually got on the scramble a majority of the time. Like on that scramble i got 9.72. I want it to output something from 9.22-10.22
sorry bc my first language is not English but are you trying to predict the time it takes to solve a Rubik's Cube based on a scramble involves? bc im not understanding
if you want numbers as output then , try regression but you have to find better format of input ,
your text is not even a meaninful text to add embedding layer for RNN/LSTM , not simple numbers to feed regression models
might need to encode string letters to some numbers but then keeping the relation and meaning to data will be difficult , need to try a lot of techniques
Hi, Can we do both SWE and data sci/Ml at the same time
I still at univ, I am not really sure about what path to really choose, tho we have to do a final sem thesis with data science/Ml .
yes, there are a bunch of intersections like
- model deployment (relatively high level and somewhat common)
-
- integrating with existing applications, or creating new applications that benefit from them
-
- to some degree scaling and overall maintenance
- writing fast and efficient libraries for data science (low level, relatively few people working on it)
depends on what do you mean by ML , if not research level , then it won't be hard to use Pretrained models via API or finetune them on your data,
no math needed unless data science or more like cleaning data and preparing proper data , but you have to decide where you want to focus more , ML is ever growing field with new good paper release on month levels
hey @final kiln
https://doc.bdd100k.com/download.html
check this out
btw I am downloading that TuSimple dataset 23 gb!!!
here they don't have dataset for particularly lane detection
For chat GPT programming I don't feel like I need the AI itself. If I could search the training data (which is has plenty of well-annotated examples) with an ordinary search function, it would be just as useful for me.
But the only way to use the training data is through the AI so I use the AI.
it would also have a lot of horrible examples that you'd find among the good ones with this hypothetical search function
also there would be a lot of data, like a lot of data, that you'll have to sift through manually
and since the training data is a mixed bag (among other reasons), you really can't just trust what the AI gives you, always double check
You don't think that the search feature could narrow it down?
I don't think the training data has much in the way of horrible examples. The amount of hand-curation that goes into training these things is enormous! Armies of global-south workers training AI etc.
I still couldn't 100% trust the training data either.
You don't think that the search feature could narrow it down?
not really? I can't imagine it at least, especially when you have like at least TBs of data right
just look at google nowadays
I don't think the training data has much in the way of horrible examples. The amount of hand-curation that goes into training these things is enormous
dunno how I'd check that honestly, but at the very least, the AIs these very curated datasets produce still often spit out crap to the point where we have rule10
it's also probably very unsustainable to just have this massive data stored all at once
I am curious how the AI narrows down training examples?
(thankfully I use the AI for the non-security-critical parts of my cloud codebase, and if it fails during testing no big deal ask it again).
If it is just as likely to give out crap, how is it more useful than searching the data and picking the best few matches to the keywords? If I could pay for API keys to query the data itself rather than download it (way to big and secret) that is OK.
I am curious how the AI narrows down training examples?
LLMs don't remember each specific example though, it just learns which words are more likely to come next given the previous N words, and right now it produces decent code with that mechanic
searching the data and picking the best few matches to the keywords?
cause that's not exactly easy? at what point does some data constitute a match with a keyword? be too lenient and you get too many results, be too strict and you get too few; there's also a lot of ways to say the same thing
"be too lenient and you get too many results, be too strict and you get too few".
A possible way around this is to set up a simple weight-vector and take the best-scoring matches.
"there's also a lot of ways to say the same thing"
This is one way I see LLM's as helping. I wonder how well word-vectors would work here?
It is still unclear to me that AI is much better than simpler techniques. Simply because I cannot access the training data without using AI. In this case "simpler" means that there is a small AI with few weights (word vectors, etc) that makes queries to the training data.
Rather than an AI trained on the whole thing.
with LLMs, there's also the hope of generalization that it can produce something that's not in the training data
I need to revive my blog ๐ฉ
What content would you guys be more inclined to read? Longer, more informative and detailed or shorter, to the point but perhaps more shallow
Interested in the opinion of both experienced people and beginners
It can generalize. As in using a custom supplied RRGGBB in "draw a rectangle in Javascript."
So far (I think) said generalization does not seem to be enough to matter. Even if I didn't have the exact RRGGBB values I could just replace them with my own and be no worse off.
Any examples where the generalization helps you a meaningful amount?
I think I see your point (though late night isn't really a good time to think and I'm not thinking too well)
has anyone tried this actually? just a small AI that searches thru a given dataset
Like AI art? Yes that would be harder to do with my "simple AI + database" idea.
If I wanted "simple AI" to make art, I would have to first:
- Query a thousand or so images from the training set that match my word vectors ("car", "blue", not "city", "shading mood", "non-cartoon style" etc). Weight images by how well they match (training data has captions).
- Splat pieces of images that match randomly (preserving origin + destination with some jitter). Splats may be a "multigrid" with splats at different scales?
- Develop a way to smooth the splats to varying extents.
- Develop a metric for how well the splats match each-other.
- Adjust smoothing as well as replace badly-fitted splats simulated annealing and/or gradient descent.
Sadly, I will never know how well this works until I can get a billion well-annotated images or so.
Maybe I will try this with mandelbrot set images that I can generate a few thousand pretty easily (but no prompt, just use the whol few thousand I generate).
I just want to get a job ๐
and there is a catch
Artificial Super Intelligence
I made a few backend and react projects , I applied for a whole lot of internships , didn't get any success, decided to just focus on leetcode and more react and development . Now I am confused wether I should switch to Ml etc or no.
then it depends on you !!
have you ever considered for FUll stack?
Um , yes , I was doing full stack MERN , but since I am sure I have to do thesis with data science / Ml , with python , I was thinking of reducing the number of languages I have to deal with by just learning Django as backend instead of Node.
There are some problems with big AI, most notably the loss of control. Python is a very complex tool but I feel still in control. Not so with GPT.
That would be why, if I can do something with a smaller tool just as easily I would prefer to do so.
Stuff like removing bias and modifying the behavior becomes easier.
for how much period of time you were doing full stack?
also you can think about going alongside with web 3
I got into web Dev since like a year, I didn't fully integrate a full-stack MERN project yet , but I did do a large backend and one large front-end project. I was continuing on this path
More than a year and half* sorry
I just want to be good enough for a job and get out of this country ๐
then focus on one skill should be priority
Well , I live in a third world country , rather not mention where.
Yes, I am ready to commit , I just need proper guidance
Loss of control does not mean "terminator takes over everything."
It means that I cannot understand the tool well enough to know when and how to use it in novel situation.
Like trying to modding minecraft from byte code instead of well-documented source code.
It makes the tool less useful for me, and limits how I can use it (still very nice to have examples calling APIs that I forget).
have you tried basic ML algorithms?
for each type of ML
Um no
you take interviews?
or you go for interview?
are you doing any job currently
yeah it!
I think I can understand NIST image recognition networks fairly well...
It's more that I wish I wasn't forced to use the AI just to access the training data!
Use the generic tool for well-established use cases (such as interview prep). But be able to use other, simplier, tools when more control is needed.
I built/trained a network in tensorflow and studied the visual cortex which is vaugly similar. It is not that hard, no where near GPT. I could do it if I put my mind to it, so could you.
You might have an intuition on what the models are doing for simple tasks like that, but the idea that you know it well enough to figure out what it will output (i.e. not make it a black box) would be revolutionary. You'd be able to preform the proverbial AI brain surgery by hand
Should I narrow down the hyperparamter search zeroing in out these results?
It would be fun to try! For a simple NIST network with a ~thousand weights.
Agreed, at least for enabling precise control and alignment
Plus if we could make models into more of a white box where we actually know what they are doing we can extract the basic formulas from models and tune out any useless or redundant connections
This sounds like a good idea. I really want to "poke" into NIST digit NNs and get some idea of the weights.
Sadly, DevOps is not as much "know things at a deep level" as much as it is "guess and check how to get cloud component A to talk to B when auth C is passed. And remember obscure configuration settings that make it work but GPT doesn't realize."
As DevOps changes to a paradigm of workflow optimization (which will resemble highly automated bio labs in terms of skills needed), a shift back to deeper understanding may happen because more time is available for the core algorithms (and more algorythims will drive the automated workflows).
you don't have to go deep in ML to get paid , there are tons of freelancing requirements which only need to know the user end ML , which only required basic on ML theory (just to know how model learn and its capability),
mostly the things you gonna do is finetune model , or RAG to get better results , for just stick together bunch of things to automate a stuff
but its not easy , at first to understand whats going on
if you already are familiar with backend then , try to get exposure of ML but stick to your strong point ,
backend devs actually get good salary
This sounds fun to me.
So Im continuig with my hyperparameter search. I zeroed in on 256 dim and 768. Cya guys in a few hours,, gotta get some new tires, there goes a thousand bucks lol
I waited 2 hours for that dataset to download
and now it failed on end point
shit happens!!
That's a nice advice , thank you
I do enjoy backend stuffs , do you think it's best to learn python backend + Ml in that case ?
why not? 
this certainly sounds like something you should at least experiment with, sounds fun
now, I don't know why I see RNNs everywhere at this point, but I'd definitely start with them for this task, but you will need quite a lot of data, how many scrambles and times have you got?
Hey guys
Lets say I have some non linear data
Like this
Now using a multi-layer perceptron , lets use two perceptrons.
How will those two perceptrons find the best line , because the data is non linear right?
The decision boundary is no longer a line. It curves around.
No I mean for the first perceptron , shouldn't it calculate the weights and bias for that perceptron?
There are multiple ways to choose the weights, most common method is backpropagation (to get information to the earlier layers) (foundation of deep learning).
(This does not actually decide how the weights are updated, just how some information (the gradient) is computed which can then be used to update the weights)
this is also a terrible classifier
I'd prefer the line
the variance is ridonculous
This is to demonstrate how it can bend around and give you some sliders to manually play around with visually.
I think you're forgetting about the sigmoid here, that's the non-linearity
let's not miss the forest for the tree though sometimes the bias-variance tradeoff of neural nets and the time to tune it just loses to a line
(or logistic regression)
Yes, but also not the question, can get to that later, important to keep in mind though.
So it is the sigmoid that makes the line divide into two?
the sigmoid is what makes you get something other than a line
the shape of the curve
it's a non-linear transformation
When combined with later neurons.
(You need some non-linearity, because linear with linear just gives you linear (or really in this case, affine))
(You can try this by modifying the desmos s(x) to identity (make it linear))
Hola people, I have been working quite extensively with pandas, but I run into one problem which frustrates me to no end, when I run a apply lambda function on a dataframe and it returns nothing, it doesnt return a dataframe no rows, but one that has shape 0,0. e.g.
df_output=df_input[output=df_input["col"].apply(lambda x: True if x in dict_test else False)]
if all rows are false the resulting dataframe is completely empty without columns
is there anyway around this?
df_output=df_input[output=df_input["col"].apply(lambda x: True if x in dict_test else False)]
This looks syntactically incorrect.
Also, what type is dict_test?
df_output = df_input[df_input['col'].isin(dict_test)]
See if this works.
:incoming_envelope: :ok_hand: applied timeout to @rigid void until <t:1718396032:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
Keeping the num embedding at 256 seems to be sweet spot, so does the embedding dim of 768 and 512. Which makes sense because they seem to align with the clip models embedding dim of 768 and its output if 512. Heres where I'm at so far, my score so far.
i built an ensemble model that combines multiple LLMs to generate responses. It uses retrievers to fetch relevant information, processes the retrieved information to extract key insights, and generates responses using multiple LLMs guided by prompt nodes. A final selection step chooses the best response based on various criteria. The system utilizes Elasticsearch for storing conversation history and long-term memory
The functionality is there , it just doesnt look very pretty. Heres a tiny output of the debug out, but when you ask it a query it will explore explore existing and new knowledge and dynamically in real time incorporate it that back into its though process . All this gets ranked and the top answered get saved back into its memory for other converations related to it.
I though instead of just training these things over and over again. Give them the ability and tools to learn new knowledge on its own accord, then save and reapply this new found knowledge. Heres an example how it searches and extract information from the web based on the query. Its more of a researchers tool then an conversational one.
Well not saved, that was a bad word, but encoded back into the elasticsearch index
@rich moth nobody is going to read these big screenshots of text
I dont blame you
What is your reason for posting them? It doesn't communicate anything other than "there exists on my computer a big blob of JSON data"
I was excited to share my AI project and show how it works behind the scenes. I thought thats what we did here? No?
Yes. I'm just suggesting that you think of a different way to share whatever is in that screenshot.
I'll be more mindful sorry
anyways!!!
Its hard to find ways at articulating this stuff. I find pictures to easier sometimes, you know picture worth a 1000 words.
this one quite literally 
Cause I had an idea you reticule me? Thats pretty cool guy
Why not have open dialogue about it instead?
No, sorry, just couldn't resist the opportunity to make some light-hearted fun
Its all good man, i could do better
Fair enough, the presentation could do with some actual visualizations or maybe just some simple formatting so that it's clear what's happening at least to some extent, yk, like at least pprint or something, that should immediately improve the presentation
The goal here definitely isn't to ridicule you. I'm just saying that you should convey information in ways that are easy to digest, or people won't want to engage.
Pictures of text aren't worth more than the text they contain--they're just harder-to-read text.
After what you told me last night, I adjusted the code and I research CLIP more to understand it. After adjusting the code a bit, i started to get mor promising results.
I trained and evaled it just like we talked about.
This is the first epoch. Something doesnt seem right
Seems good
"doesn't seem right"
"seems good"
so, which one is it? 
Haha, I was just having fixed feeling what I was experencing.
lol
lol its overfitting after 10 epochs need to intergrate more datasets
I was hoping to automate this.
Can I share my current implemenation of doing this in python?
what is it
PowerPoint 
powerpoint can be pretty good
What is it
AE
even in this channel it doesn't feels very obvious that AE means auto-encoder
well, tbf, there's the diagram for context ๐
(which Stel asked what it was, so I guess that's not helpful anyway...)
mmm, they generally seem more rotated when looking them up on the internet it seems 
I also didn't add any labels or anything 
How do I apply EarlyStopping from Pytorch Ignite into my Vision Transformer model?
Can I use EarlyStopping from Pytorch Ignite with the trainer from the transformers library?
Are you up sampling with pooling or just with convs?
Idk about PyTorch Ignite, will have to look it up later. However, in normal PyTorch, you'd have to code it inside your training loop. If you're using PyTorch Lightning instead, it's much easier to just add the EarlyStopping callback
I'll have to look for the pytorch lighitng earlystopping. I have to train a ViT
Coding early stopping each time is one of the reasons I moved to lightning
There's no reason not to use lightning (unless you're a beginner, then I think writing it out is good)
Oh jesus
Welp I'm a beginner x,d I still have to implement the ViT but I'll use a pretrained model from HuggingFace
Same here. It just saves you from having to deal with boilerplate code
what does it mean if i got a training curve that looks like this (for ANN), did my model overfit or underfit or whatever?
If you're trying to become an expert or do this for a living in the long run just do it without lightning a couple of times imo
If this is some exercise you need to get through ASAP or you're just exploring, use lightning
Yes it's overfitting. The larger the gap between your train accuracy and validation accuracy, the worse your model generalizes to unseen data.
The goal is for both train accu and val accu to be as close as possible.
Yeah I want to do my master's degree in AI, I think it would be better if I implement it on my own
I'm using this Notebook as a guide: https://colab.research.google.com/drive/1Z1lbR_oTSaeodv9tTm11uEhOjhkUx1L4?usp=sharing#scrollTo=XC9HqG5u750_
The training function is implemented from scratch, but there's no early stopping there as the training epoch are very small
My dataset consists of 100K+ images in the training
I'll also use another dataset but with distinct labels later but my group is still dividing it
what would you suggest? read something like early stopping @ around the point where the val accuracy starts to plateau, or maybe there are other ways?
this is for an ANN btw that's coded from scratch, so it's just an exercise
Could you give me some advice on how to implement it? I'm also thinking of the amount of training epochs I have to do since the dataset is quite big
With a batch_size of 32 the max training epochs would be around 3406 which is quite an insane number and based on what I've read it could make the model overfitt
Question: I've seen some researchers dividing the datasets in train, test and validation. Wouldn't validation be essentially the same as test?
Personally, I don't think a 5% - 8% difference is too wide a margin to worry about. But then, it also depends on your threshold and use case...
So you could leave it as it is at the moment, or train for just 20 epochs
i'm not that experienced yet but afaik you do a train-validation split during training to monitor the performance of your model, to check if it's over or underfitting etc, then after training that's when you test it on a test set
so yeah, they're different afaik
aight thanks
Can I ask you some stuff privately?
Yeah, using an EarlyStopping could as well help to mitigate overfitting.
Could you give further insight in how to apply EarlyStopping in the training function?
Like
Well I've read that you can use the loss
So if I give the loss from the nn Module could that be used as a parameter of the early stopping?
No you can ask here. It's 5 am here and I'm going back to get some more sleep.
I'm sorry if I ask too much, I'm new too this and I'm a person who asks lots of questions
Ohh sorry, I'll send you a friend request so we can talk tomorrow I guess. I see how I figure myself out from this
It's okay. No worries.
import torch
class EarlyStopping:
def __init__(self, patience=7, verbose=False, delta=0):
self.patience = patience
self.verbose = verbose
self.counter = 0
self.best_score = None
self.early_stop = False
self.val_loss_min = float('inf')
self.delta = delta
def __call__(self, val_loss, model):
score = -val_loss
if self.best_score is None:
self.best_score = score
self.save_checkpoint(val_loss, model)
elif score < self.best_score + self.delta:
self.counter += 1
if self.verbose:
print(f'EarlyStopping counter: {self.counter} out of {self.patience}')
if self.counter >= self.patience:
self.early_stop = True
else:
self.best_score = score
self.save_checkpoint(val_loss, model)
self.counter = 0
def save_checkpoint(self, val_loss, model):
'''Saves model when validation loss decrease.'''
if self.verbose:
print(f'Validation loss decreased ({self.val_loss_min:.6f} --> {val_loss:.6f}). Saving model ...')
torch.save(model.state_dict(), 'checkpoint.pt')
self.val_loss_min = val_loss
Now, inside your training loop, you'd need to use an instance of this class to implement EarlyStopping
Thanks!
Given that the patience level is 7, you want to trigger EarlyStoping to force the model to stop training if the validation loss doesn't improve after 7 epochs.
The train loss might as well be decreasing, but with EarlyStopping, we're mainly interested in monitoring the validation loss to ensure it also decreases during training.
Got it dude!
Mmmm I got a question, can I train my ViT with a 4060 in my laptop, given that the amount of images is 100K>?
I mean, I'm not upsampling anything rn ๐
but otherwise just transposed convolutions
Had a lot of fun playing around with conv autoencoders in the past, it's how I did it as well
Theres only one way to find out ๐
True, I'll have to apply it after all
How do you know you've reached convergence?
just saying, but that's from google
Anyone familiar with NLP can guide me how I can extract stuff from a paragraph of text like Date, Time ,Total Cost
East Repair Inc.
1912 Harvest Lane
New York, NY 12210
BIN To Ship To
John Smith John Smith
2 Court Square 9787 Pineview Drive
New York, NY 12210 Cambridge, MA 12210
ary DESCRIPTION
1 Front and rear brake cables
2 New set of pedal arms
3 Labor Shes:
Terms & Conditions.
Paymentiis due within 15 days
Please make checks payable to: East Repair Inc.
RECEIPT
Receipt # us-001
Receipt Dato 11/02/2019
P.O# 2312/2019
Due Date 26/02/2019
UNIT PRICE AMOUNT
100.00 100.00
15.00 30.00
5.00 15.00
Subtolal 145.00
Sales Tax 6.25% 9.06
TOTAL $154.06
Smithy
for example from a paragraph like this
If i have two linear layers (or any) does it mean i have two hidden layers?
depends on if you want to consider the activations and various norms and regularisation as part of that layer or a separate layer
diagrams would likely just draw 2 hidden layers, I would consider there to be at least 4
You could use NER or an AI Agents (which leverages a LLM)
Hi i have following code which finds the closest boxes to camera:
def detect_closest_license_plate(
session: onnxruntime.InferenceSession,
image,
img_width: int,
img_height: int,
logger: logging.Logger,
) -> ClosestPlate:
predictions = get_predictions(session, image, img_width, img_height, logger)
if len(predictions) == 0:
return None
camera_center = np.array([img_width // 2, img_height // 2])
closest_plate = None
closest_distance = float("inf")
for license_plate in predictions:
x1, y1, x2, y2, conf = license_plate
plate_center = np.array([(x1 + x2) // 2, (y1 + y2) // 2])
distance = np.linalg.norm(plate_center - camera_center)
if distance < closest_distance:
closest_plate = ClosestPlate.from_dict(
{
"bbox": (x1, y1, x2, y2),
"confidence": conf,
"plate_center": (plate_center[0], plate_center[1]),
"distance_to_camera": distance,
}
)
closest_distance = distance
return closest_plate```
And im wondering how could i get distance from camera to plate_center
I want to make this function return result only if the object is some distance to my camera
Eg object crosed that line, so its like aproximently 2m from my camera
Here is the example img
Is feature engineering is like mini model to raise the accuracy of the actual model?
feature engineering isn't a model. can you explain in your own words what a feature is?
this is not a test. I just want to know what you know.
I didn know ... literally
features are just properties of "things" that you can use for machine learning.
if you're trying to teach a model to take "a house" and predict its value, you would need features about each house. And the features would be the size of the house, and the number of rooms, and whether it's detatched or a town house, etc.
features are basically the columns in your table.
Ty for the explanation... tried to watch few yt videos...most of em doesnt really explain ...like most of their explanation is kind of explanation which targeted to ML engineer that already know
there isn't really quality control on youtube videos. anyone can post one.
@final kiln how was prefect? Would you use it for data pipelines or just orchestrating infra like you were doing?
I'm currently using Dagster and it's a very big PITA. I need to refactor it away. Airflow is an option or just good ol' cron
Observability is exactly what I want (or I'd use cron)
Rust for training models or Prefect in general?
I'd just use Airflow in the real world
it's a hobby project
most popular, robust solution in this space
I guess that's what I should do
Looking at the docs, this would be something I'd deploy myself
OSS products that also have a managed alternative typically have confusing docs
At least, ime
so,its like pattern
like if the house is expensiv ,the house is big..like that
I'm not quite sure what you mean. if you're trying to predict the value of a house, the features should be properties of the house that influence its value
like we serve the model kind of pattern that we have study from the table which influenc the data
Features are just variables. The inputs you give to a model. Feature engineering means that you're given a bunch of features from somewhere (for instance a database, csv file, ...) but you create new ones
Hello. I need help.
Source code: https://paste.pythondiscord.com/JICA
Error: ```py
Traceback (most recent call last):
File "d:\xampp\htdocs\dishub\AdminLTE-3.2.0\mesin_penghitung_2\sistem.py", line 27, in <module>
net = cv2.dnn.readNetFromDarknet(model_config,model_weights)
cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'readNetFromDarknet'
Overload resolution failed:
- Can't convert object to 'str' for 'cfgFile'
- Can't parse 'bufferCfg'. Input argument doesn't provide sequence protocol
What does this error mean? What should I do?
And the price of houses in general
The rate of housing starts to the population in the United States continues to decline.
Never recovered to early 2000s levels after financial crisis
If that ratio continues to decline you would expect the price of houses to continue to go up for the same house in different time periods
Any ideas?
but the distance from the camera to the plate center is not directly measurable from the 2D image coordinates
they provide the position of the plate center in the 2D image plane
not the actual 3D distance from the cam
you can estimate the distance using the concept of similar triangles
if you have the camera's intrinsic parameters
I think he got offline
Not you, I'm talking about @hollow escarp
Like i said, it can be measurable directly from 2d coordinates
they provide the position of the plate center in the 2D image plane
not ACTUAL 3d distance
After 25 epochs it has generalized on unseen data , pretty well. I want to introduce more datasets. But I ran out of disk space ๐ฆ
yooo, that's great
Not bad, huh? Thanks for your help
I think it's a VQ-VAE + CLIP
yes, that would be the core of it
I do wonder what CLIP brings to the VQ part though
unless it's a VAE + CLIP
^
CLIP introduces multimodal aligment and semantic understand to the VQ-VAE model . Seems like its in enhancing the reconstruction process using text.
You were talking about VQ-VAE the other day which gave me an idea after I looked it up.
It's a multi-dimensional space where each point represents a possible combination of features from the two models.
Hello. I need help.
Source code: https://paste.pythondiscord.com/JICA
Error: ```py
Traceback (most recent call last):
File "d:\xampp\htdocs\dishub\AdminLTE-3.2.0\mesin_penghitung_2\sistem.py", line 27, in <module>
net = cv2.dnn.readNetFromDarknet(model_config,model_weights)
cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'readNetFromDarknet'
Overload resolution failed:
- Can't convert object to 'str' for 'cfgFile'
- Can't parse 'bufferCfg'. Input argument doesn't provide sequence protocol
What does this error mean? What should I do?
yes
Hi,
Hope u are doing well,
I am working on a time series (wind speed)forecasting using CNN-LSTM-Attention model, the data is highly variable as shown in the figure attached, the model forecast generally follow the trend of data (red curve) but fails in details, i am using exogenous features too such as temperature, humidity and ect.
Please what can u suggest to improve the quality of forecasting ( I am getting a R2=0.6 and a MAPE=32%).
thats a really good idea
keep em coming ๐
Maybe your interested in working on it together then.
No worries . How is the jjob ssearch going?
Really? Im surprised. I know the tech industry has been having lots of layoffs. It wont be long till you land something
I'd hire you, if that makes you feel any better ๐
what are you using a CNN for 
I am using 1D-CNN for feature extraction and LSTM for handling temporal dependencies
really?, i tried transformers too but my model performed it
if u have something to suggest so it's welcome
have you used transformers for timeseries?
maybe, but afaik, RNNs are more versatile
I don't remember :p
def __init__(self, attention_size):
super(SelfAttention, self).__init__()
self.attention_size = attention_size
self.query_dense = layers.Dense(attention_size)
self.key_dense = layers.Dense(attention_size)
self.value_dense = layers.Dense(attention_size)
def call(self, inputs):
# Compute queries, keys, and values
queries = self.query_dense(inputs)
keys = self.key_dense(inputs)
values = self.value_dense(inputs)
attention_scores = tf.matmul(queries, keys, transpose_b=True) / tf.sqrt(tf.cast(self.attention_size, tf.float32))
attention_weights = tf.nn.softmax(attention_scores, axis=-1)
attention_output = tf.matmul(attention_weights, values)
return attention_output```
input_shape = (n_hours, features)
# Define input layer
inputs = Input(shape=input_shape)
inputs=BatchNormalization()(inputs)
# First residual block
conv1 = Conv1D(filters=64, kernel_size=4, padding="same",kernel_initializer="random_normal")(inputs)
conv1 = MaxPooling1D(pool_size=2)(conv1)
shortcut = Conv1D(filters=64, kernel_size=4, padding="same",kernel_initializer="random_normal")(inputs)
shortcut = MaxPooling1D(pool_size=2)(shortcut)
residual = Add()([shortcut, conv1])
#LSTMM1=LSTM(80, activation="tanh",return_sequences=True,kernel_initializer="random_normal")(residual)
lstm_out = layers.LSTM(80, return_sequences=True)(residual)
attention = SelfAttention(attention_size=64)(lstm_out)
flatten = layers.Flatten()(attention)
# Dense layers
LSTMM1=Dense(128, activation="linear",kernel_regularizer=l2(0.001))(flatten)
outputs = Dense(y_trainlstm.shape[1]*y_trainlstm.shape[2],activation="relu")(LSTMM1)
outputs = Reshape((y_trainlstm.shape[1],y_trainlstm.shape[2]))(outputs)
modelCNNLSTM = keras.Model(inputs =inputs,outputs= outputs)
print(modelCNNLSTM.summary())
modelCNNLSTM.compile(optimizer=Nadam(learning_rate=0.0001), loss='huber')
mc = ModelCheckpoint('best_modelCNNLSTM1.keras', monitor='val_loss', mode='min', save_best_only=True)
early_stopping = EarlyStopping(monitor='val_loss', patience=5, restore_best_weights=True)
reduce_lr = ReduceLROnPlateau(monitor='loss', factor = 0.9, patience = 4, min_lr = 1e-7, verbose = 1)
history1=modelCNNLSTM.fit(x_trainlstm, y_trainlstm, epochs=50 , validation_split=0.2,batch_size=64,shuffle=True,callbacks=[early_stopping,mc,reduce_lr])```
this is my model
would have to ask zestar about timeseries stuffs
i did and this my transformers model:
def transformer_encoder(inputs, head_size, num_heads, ff_dim, dropout=0):
x = MultiHeadAttention(key_dim=head_size, num_heads=num_heads, dropout=dropout)(inputs, inputs)
x = LayerNormalization(epsilon=1e-6)(x)
x = layers.Dropout(dropout)(x)
res = x + inputs
x = layers.Conv1D(filters=ff_dim, kernel_size=1, activation="relu")(res)
x = layers.Conv1D(filters=inputs.shape[-1], kernel_size=1)(x)
x = LayerNormalization(epsilon=1e-6)(x)
return x + res
# Define the Transformer model
input_seq = Input(shape=input_shape)
x = transformer_encoder(input_seq, head_size=64, num_heads=2, ff_dim=32, dropout=0.1)
x = transformer_encoder(x, head_size=64, num_heads=2, ff_dim=32, dropout=0.1)
# Flatten and Dense layers
flatten = Flatten()(x)
output = Dense(1)(flatten)
is he or she a member here ?
it's the encoder part of a transformer, i tried TFT model too but same results
but when i apply a smooth to my data i get good results as shown here
increasing the model capacity can not lead to an overfit knowing that i am using early stop which prevent overfit
this is my train /val errors graph
do u see that, like my model isn't complex ,comparing to a time series model ?
u meant adding a new conv layer at the beggining ?
but i am putting them at the beginning ?
so u meant that adding a third one ?
so in that case, my model will be LSTM-Attention model, is it your purpose ?
this one
before smoothing the target variable
but this lead for a weak metric results
i see but it's really improved thing
in reality, i did, i applied outliers detection, PCA, i add more features, i calculated the correlation matrix, i calculated the importance of features using random forest, i used sliding window technique to transform data into sequences and finally normalize data
i think yeah, but if i focus only on noise i will get worste results not like when i smooth data
So I used that trained model I made to try and manipulate a jpg. It understood the color red and applied it, but not exactly what I wanted ๐
I only trained this thing for about 13 hrs on one dataset, I should have used multiple oness, but I need to recover some disk space from my wsl2 ubuntu instance.
In fact, this data represents wind energy data, and my goal is to predict the data 24 steps ahead that will help me schedule the energies. so maybe noise can be important too, but if i see that enabling noice poses a challenge i will smooth data ofc but i have to try with
Which are some pf the good field for research in ai
some pf?
Of*
@errant bison generative AI is popular right now. not sure how it is as a research area.
though genai requires a lot of advanced knowledge.
Can anybody tell me why the logs appears to be like this:
But not like this: I've been following various tutorials on HuggingFace and Youtube
I'm using a local dataset that is inside the project folder in my computer
Whoa. I got a great idea. I can augment the captions from the orginal dataset with a sentance transformer, capturing more of the semantic meaning by expanding its vocabulary and understanding of the scence, just slighty different, but same. You can describe and image in multiple ways. It seems like a good concept ?
This is the path of the dataset: train_dataset = Path("..\datasets\ASL_train")
test_dataset = Path("..\datasets\ASL_test")
I have no idea why the trainer looks so different in his video from mine
struggling with RL once again
i got such a result when obtaining point cloud data from the depth image. is this the result i should get or is there a problem?
any opinions on DLinear
Oh ohkk, and which domain like health care, education etc? Which one would u prefer
Ok I changed things around a bit in my vqvae model. It integrates sentence transformers, manifold learning to control how the images change and attention mechanisms to focus on the most important words.
Now its suppose to learn all this directly on datasets by measuring the vectors between the images and text in the trarining process. The autoencoder then trains to reconstruct those different vectors and in doing so learns how to captures the direction for image manipulation. The attention weights are also learning durning tthis process too, it figures out what captions are more relevent of the a given image and assings higher weights to them when aggregating the projected differences .
All research areas are pretty good. NLP has been getting much attention for a couple of years now especially with LLM & PEFT being one of its driving force.
If you wanna work on research areas that are not over hyped like LLM but equally good, then I think you should look into Reinforcement Learning, Federated Learning, Privacy-Preserving ML, AI Alignment, and Neuroscience.
Image processing related? You can also check our sister channel #media-processing
Its working! Wow the training time takes around 40 mins now, it use to be like 7 minutes
Im gonna need some serious hardware lol
Thats from the first epoch.
wind power data or also wind speed data is known by its high variability, all researchers in this feind said that, concerning the noise, we can not consider it as a noice in reality because it represents a real data( those picks are real one and we can't also consider them as outliers )
Look how well its learning.
This is what I see when I try to read that
Can you post text as actual text from now on?
I apologize thanks for point that out. You got. Epoch [2/5], Train Loss: 0.0004, Val Loss: 0.0017, Train PSNR: 15.4822, Val PSNR: 16.1355, Train SSIM: 0.2424, Val SSIM: 0.2738
I figure I'd update you guys a bit less often, im just really excited. But heres the results from the first run. It's important to note this version was without sentance transformers incorporated. Epoch [3/5], Train Loss: 0.0004, Val Loss: 0.0017, Train PSNR: 15.6918, Val PSNR: 15.6039, Train SSIM: 0.2612, Val SSIM: 0.2672 Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [34:24<00:00, 1.33s/it] Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [03:58<00:00, 1.63it/s] Epoch [4/5], Train Loss: 0.0004, Val Loss: 0.0017, Train PSNR: 15.9803, Val PSNR: 16.6987, Train SSIM: 0.2814, Val SSIM: 0.3348 Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [35:23<00:00, 1.37s/it] Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [03:42<00:00, 1.74it/s] Epoch [5/5], Train Loss: 0.0004, Val Loss: 0.0017, Train PSNR: 16.2615, Val PSNR: 16.8271, Train SSIM: 0.2983, Val SSIM: 0.3014

Honestly, thank you everyone for letting me share with you. I have a feeling im probably a bit annoying and being to honest here, but I dont have friends that are into stuff. And it
hard to find people to engage with I guess on my level. Im not quite as advanced as you guys obviously.
btw, you could add an accuracy metric as well, unless one of those abbreviations already is that
hmmm, does accuracy make sense for image reconstruction?
I think I get what you're asking about accuracy. i'm not sure that applies in image reconstruction, maybe Im confussed. From what I've read, PSNR and SSIM are better at measuring that.
I think you suggested it to me..
no yeah, fair enough, accuracy is probably gonna be pretty low and thus not a particularly great metric, yeah
I trained it another two epochs, but I need to take a break, appreciate you people. Heres my results from that Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [34:05<00:00, 1.32s/it] Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [03:55<00:00, 1.65it/s] Epoch [1/2], Train Loss: 0.0004, Val Loss: 0.0017, Train PSNR: 16.4321, Val PSNR: 17.1083, Train SSIM: 0.3143, Val SSIM: 0.3549 Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [35:45<00:00, 1.38s/it] Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [03:51<00:00, 1.68it/s] Epoch [2/2], Train Loss: 0.0004, Val Loss: 0.0016, Train PSNR: 16.9217, Val PSNR: 17.3436, Train SSIM: 0.3533, Val SSIM: 0.3787
Talk to you guys later
Here's the code I used to created the confusion matrix:
cm = confusion_matrix(y_true = test_labels, y_pred=y_preds)
plt.figure(figsize=(15,15))
sns.heatmap(cm/len(class_names), annot=True,cbar=False, fmt='.2f',cmap='Accent_r')
plt.xlabel('Prediction')
plt.ylabel('Actual')
plt.title('Confusion Matrix');
Why the output displayed like that?
Hello. I need help.
Source code: ```py
target=320
model_config=Path(file).parent.resolve()/'yolov3.cfg'
model_weights=Path(file).parent.resolve()/'yolov3.weights'
net = cv2.dnn.readNetFromDarknet(model_config,model_weights)
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_OPENCV)
net.setPreferableBackend(cv2.dnn.DNN_TARGET_CPU)
Error: ```py
Traceback (most recent call last):
File "d:\xampp\htdocs\dishub\AdminLTE-3.2.0\mesin_penghitung_2\sistem.py", line 27, in <module>
net = cv2.dnn.readNetFromDarknet(model_config,model_weights)
cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'readNetFromDarknet'
> Overload resolution failed:
> - Can't convert object to 'str' for 'cfgFile'
> - Can't parse 'bufferCfg'. Input argument doesn't provide sequence protocol
What's happening here? What does this error mean? How can I fix it?
it doesn't understand what a pathlib.Path is, you need to convert it to a string
Okay, but what I don't understand is that if I remove the Path function, it shouldn't have had any problem, but instead:
Aight. Thanks!
Hello again. This time, I have a big question about directory path.
So, when I opened the exact folder in VSC where all my codes are written, my code ran well.
But, once I open few files backwards, my code throws error instead.
The thing is, my code is still the same, I have not changed it yet, but just because I open the 'wrong' folder in VSC (which technically contains the right folder), it gives a huge difference towards the result. Why?
HI guys what is use of the dummy variable trap?
Aight, the rag thing is deployed
It doxes me very hard so I can't share ๐ญ
Basic but functional UI
Honestly, I overengineered mine
Running a dagster instance for the pipelines, doing the UI in svelte, backend in FastAPI, pgVector DB, etc.
If I did it with streamlit/gradio + chromaDB I'd have been done in 4 days maximum
no
โฌ5-6 p/m server
That runs all of my other projects
When I finish the "host it yourself" section I think anyone could roll with it ๐
If you're applying a RAG like this may actually help
recruiters can use it to see what you've built
but that's also interesting ofc
Like I told you, the thing that interested people the most (tech and non-tech) was the stupid GenAI photobooth I made with Django for $largeMusticFestival in <1 week ๐ฅด
automatically writing cover letters ๐
What does this mean
OpenAI
I have 4 gb ram
For ALL of my services lol
I have a spend cap ofc
current_spend = await self.retrieval_service.get_current_spend(date.today())
if current_spend >= self.max_spend:
raise MaximumSpendError()
My spend cap is brutal tbh
It can cost me max โฌ1.5/day
Which is 547 / y
nah I'm fine. I'll solve this with a clever feature ๐
"Apply for elevated spend" which sends me an email. I log into a management UI, generate a JWT and send it back to the person's contact details (+ delete them afterwards)
Yeah stuff like that can work for sure
I'd start with ollama for testing and then go to rust
Yeah, safetensors
or onnx
How efficient is it?
it is relatively efficient
If I needed as much perf as possible I probably wouldnt use it th
not because of the inference but the API overhead and data wise isn't the best
yeah that is probably fine
My issue is partly learning new APIs
When a threadpool and a basic endpoint could work
but that's a me problem
Ollama's api is pretty simple though really
like for generative text it is pretty solid
The biggest issue i've had deploying models as an API before though (and this is less of a ollama thing and just a general thing) is load balancers hate them
your latency tends to be high and under higher load the load balancers end up opening thousands and thousands of connections ๐
where is help about python?
Thanks a lot and what domain would u prefer, health care, education etc
ty
Nice, lmk know how it goes
Yeah or actually
Why don't you just use AWS bedrock?
Last time I did a RAG before this I used Bedrock + Lambda
if you go with bedrock + lambda you don't need those
I currently work on low-resource NLP, however, my domain of interest does not matter here.
It still boils down to you. I get that it can sometimes be
hard to narrow down / figure out a specific area of research interest.
I think you should make your decision based on what you find more impactful, fascinating, or very-confused-and-unclear-about-yet-curious-enough-to-find -out.
Hi guys, could anybody point me in the right direction? I want to train an agent from real-time frame capture. Which windows tools could help with this?
windows tools??
I am hearing/reading this first time!
Could OpenCV help with this?
elaborate more about problem!
Also: My incomplete experience as a PhD candidate taught me the importance of a good advisor. I went with the subject -I- wanted but a not very good advisor, but should've picked a different advisor who was more engaged (and I knew it, and they tried to recruit me), but a domain I was slightly less interested in (and ironically, the domain I work in now)
RIP
Hi, i have conducted a survey and in need of generating multi-level cross-tables like image shown below. I generated this using SPSS custom table function (CTABLES). I don't know if there is a similar Python package that does this. Any ideas ? Thanks
at least use chromadb then lol
what is the current format of the data? excel? csv?
raw data is .csv
i used SPSS for CTABLES function
you can use pandas to reshape and concatenate the data from all the files, then write it out to xlsx
I suffer from this too but making a kanban or similar on gh projects makes me feel a lot more accountable
I write down each idea and assign it to milestones
does anyone have any source or references about Q-learning? im kinda confused on how the algorithm works on python and whether to go with monte carlo or temporal difference
http://incompleteideas.net/book/the-book.html
This is the best resource you can get on the topic
Also, go with TD methods over monte carlo
So, Q learning, SARSA and so on
GH projects works really well for me and is low effort enough to consistently use
For this project I just make all ideas issues and assign them to a milestone or none (if I don't know what to do with it yet)
and then never do work that isn't linked to a milestone (at least, in spirit). Right now I'm in the "stabilising" milestone for my current project so no new features will be made
cool, thx
ah doesn't get much better than this
the problem that i am the first using this data, so there is no previous work on it, so i can't compare
I think I get what you mean
Hi all! I am a surgeon in the USA (first-year resident) who is taking a year to publish some projects related mainly to biostatistical analysis / basic comparisons.
Would anyone have a good online guide / github guide for my usecases?
I'm new to coding but figured python would be a good language to focus on.
I mostly do basic descriptive stats, univariate or multivariate comparisons, survival analysis etc..
that's nice to hear!!, well done SIR!!
I'm running into an issue with the integration of sentence transformer. Im trying to expand the text_features tensor to get it to match the dimensions of the image features. You can see their shapes in the code below. But I get a error when expanding text features to image features, its expecting a 4 dimensional tensor. Im trying to project them to the same shape , how do I I get the tensor dimensions to match up?
text_features shape: torch.Size([2, 512])
image_features shape: torch.Size([2, 768])
Training: 0%| | 0/1551 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/plunder/testrun01.py", line 347, in <module>
main()
File "/home/plunder/testrun01.py", line 328, in main
train_loss, train_psnr, train_ssim = train(model, train_dataloader, optimizer, clip_model, clip_processor, sentence_transformer_model, manifold_autoencoder_optimizer, win_size, data_range)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/testrun01.py", line 224, in train
output_data, vq_loss = model(images, augmented_captions, clip_model, clip_processor, sentence_transformer_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/testrun01.py", line 151, in forward
text_features = text_features.expand(image_features.size())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: expand(torch.cuda.FloatTensor{[2, 512, 1, 1]}, size=[2, 768]): the number of sizes provided (2) must be greater or equal to the number of dimensions in the tensor (4)```
rank usually means something else, but yeah
rank 4, order 4, 4-way array, tetradic/4-adic, among others
though rank usually relates either to the higher order SVD or to the canonical polyadic decomposition
but how can a non-tech can join board?
is he joins for AI safety?
I was litterally amazed when Illya left!!
Does anyone have any suggestions? I can post my VQVAEwithmanifold if anyones interested. ```Encoder output shape: torch.Size([16, 768, 56, 56])
Quantized shape: torch.Size([16, 768, 56, 56])
Difference shape: torch.Size([512])
Reshaped Difference shape: torch.Size([512])
Input shape to ManifoldAutoencoder: torch.Size([1, 512])
```Traceback (most recent call last):
File "/home/plunder/FUCKYA4.py", line 372, in <module>
main()
File "/home/plunder/FUCKYA4.py", line 353, in main
train_loss, train_psnr, train_ssim = train(model, train_dataloader, optimizer, clip_model, clip_processor, sentence_transformer_model, manifold_autoencoder_optimizer, win_size, data_range)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/FUCKYA4.py", line 240, in train
output_data, vq_loss = model(images, augmented_captions, clip_model, clip_processor, sentence_transformer_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/FUCKYA4.py", line 158, in forward
_, manifold_difference = self.manifold_autoencoder(difference.unsqueeze(0)) # Add batch dimension
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/FUCKYA4.py", line 32, in forward
z = self.encoder(x) # Latent representation (manifold)
^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/container.py", line 215, in forward
input = module(input)
^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x512 and 768x512)```
Honestly all the AI pushing stuff is what is going to push me to linux tbh
Im not a big linux person outside of deploying servers, but god damn I just do not give a fuck about copilot of all this AI shit
get it off my software that I pay for
At least make it an optional feature
only issue I have, is linux still suffers so heavily from the "tech people only" mentality
it has got a lot better recently mostly because of steam
but you still need to effectively compile everything from scratch
and you can't get most non-techy people to do that
No my experience has been in general, there will always be somethings that you end up having to compile from scratch
or require dependencies that require building from scratch
or have more complicated install requirements that require some level of technical knowledge
Probably top of my list would be OpenSSL related things, i.e. some packages that require openSSL but can't find it
yeah
Although I have personally had issues before trying to install even a simple deb file
Website list it as the correct version for the OS? Check!
Checksums match? Check!
Try to install via CLI? ERROR! This file isn't a deb
Yeah, and that is realistically the biggest problem
the errors and issues that arise normally assume technical knowledge
and that just doesnt work with normal users
Kinda feels like you need an OS ontop of linux especially designed for non-techy users
Chrome books are pretty solid... If it wasn't so google heavy LOL
I fixed it! Training: 1%|โโโ | 22/1551 [00:38<43:20, 1.70s/it]
Now we are training with sentence transformers as well.
Dude that was a serious pain in the ass, let me tell you
I also increased the latent space from 128 to 256, I feel thats the sweet spot. 128 just wasnt capturing enough I feel.
Its not just a normal sentance transformer though, its a clip one.
Well I guess there is no "normal" one, I meant for justal text, not images.
Guys I am stuck.
https://pytorch.org/tutorials/intermediate/reinforcement_ppo.html
This is my Pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://download.pytorch.org/whl/"
verify_ssl = true
name = "downloadpytorch"
[packages]
torch = {version = "==2.2.1", index = "downloadpytorch"}
torchvision = {version = "==0.17.1", index = "downloadpytorch"}
torchaudio = {version = "==2.2.1", index = "downloadpytorch"}
ipykernel = "==6.29.3"
matplotlib = "==3.8.2"
pandas = "==2.2.1"
seaborn = "==0.13.2"
opencv-contrib-python = "==4.10.0.82"
mss = "==9.0.1"
tensordict = "==0.3.0"
torchrl = "==0.3.0"
tqdm = "==4.66.4"
[dev-packages]
[requires]
python_version = "3.11"
Why does this line give from tutorial give error?
base_env = GymEnv("InvertedDoublePendulum-v4", device=device)
Is grokking machine learning a good book to go through for getting into ML?
Look in the pins
Traceback (most recent call last):
File "/home/plunder/FUCKYA7.py", line 380, in <module>
main()
File "/home/plunder/FUCKYA7.py", line 361, in main
train_loss, train_psnr, train_ssim = train(model, train_dataloader, optimizer, clip_model, clip_processor, sentence_transformer_model, manifold_autoencoder_optimizer, win_size, data_range)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/FUCKYA7.py", line 248, in train
output_data, vq_loss = model(images, augmented_captions, clip_model, clip_processor, sentence_transformer_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/FUCKYA7.py", line 174, in forward
aggregated_difference = aggregated_difference.view(batch_size, -1, 1, 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[11, -1, 1, 1]' is invalid for input of size 256```
Noo!
Anyone have any insight?
This means that you tried to reshape aggregated_difference, which is an array or tensor, into a shape that it simply can't be
Like, if you have a tensor of shape (4, 2), that has 8 elements. So you can't reshape it to (2, 3) because that would only be six elements. Every element needs somewhere to go
The -1 in that error message represents "whatever number would make this work". If you tried to reshape a tensor with 12 elements to (3, -1, 2), the -1 would get solved to 2, because 3 times 2 times 2 is 12
In your case, there's no integer that makes it work
Does that make any sense, @rich moth ?
I think so. My calculation need to include the specfics of the shape?
I see I think i understand now. Not the shape but elements I meant. I need the correct dimensions to extract those.
in reinforcement learning is there an alternate to completely random, random discovery. I dont want my agent taking completely random actions but i want it to explore
It's working, so far. you were right using -1 was causing a problem because there was no integer that could complete the entire shape.
I also had the wrong latent space of 256, i changed it to 768 and things to be training again. fingers crossed thank you
How do you quickly learn statistics? I know NO statistics, but I've been told that CS majors are expected to know some. I have summer off, so how can I learn statistics quickly before next school year. Is Khan Academy good enough?
<#databases message>
Khan Academy is probably good, yes
I'm not entirely sure about value learning, but at least with policy gradients you can output probabilities and pass those as weights to a random choice function, not sure you even have an epsilon thingy at that point anymore
Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [05:10<00:00, 1.25it/s]
Epoch [1/5], Train Loss: 0.0001, Val Loss: 0.0001, Train PSNR: 14.2016, Val PSNR: 15.3402, Train SSIM: 0.1445, Val SSIM: 0.2102
Traceback (most recent call last):
File "/home/plunder/OK.py", line 364, in <module>
main()
File "/home/plunder/OK.py", line 357, in main
reconstructed_images, _ = model(sample_images, [""], clip_model, clip_processor, sentence_transformer_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/OK.py", line 138, in forward
tokens = sentence_transformer_model.tokenize(caption)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 319, in tokenize
return self._first_module().tokenize(texts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/sentence_transformers/models/CLIPModel.py", line 71, in tokenize
inputs = self.processor(text=texts_values, images=images, return_tensors="pt", padding=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/plunder/miniconda3/envs/qusar/lib/python3.11/site-packages/transformers/models/clip/processing_clip.py", line 98, in __call__
raise ValueError("You have to specify either text or images. Both cannot be none.")
ValueError: You have to specify either text or images. Both cannot be none.```
Dang I'll have to look into this more
Oh I see ,, I think its from the visual metric.. Doees that look right to you guys? It cant display the text output and the image?
What do you guys think?
I might have create a dummy for the text for now. Hopefully this works.
Is it me or does that train loss and val seem suss?
its actions will become less random over time.
@rich moth can you put all of OK.py in the paste bin?
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
the code that you put in the paste bin has to be the exact code that caused the error. If the line numbers don't match up, it's useless.
Can anybody tell me why am I getting this error despite the fact that I've already installed accelerate and ran all the cells again in Collab?
This is the error. Even though I already have accelerate installed in this notebook
@frigid cove I think this is a package dependency error
Yep, had to restart it
Two things:
- Is this shit overfitting? The loss seems to reduce too fast (Gave it 5 epochs)
- Why is it stuck at 7/12970 despite that the loss is reducing
I was able to bypass it for now passing an empty tensor to the visuals for the captions the model produces, though I would like it add it, the model is finally progressing to the next epoch. Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [40:19<00:00, 1.56s/it] Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [05:26<00:00, 1.19it/s] Epoch [1/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 14.2622, Val PSNR: 14.6331, Train SSIM: 0.1447, Val SSIM: 0.0673 Training: 9%|โโโโโโโโโโโโโโโ | 139/1551 [03:51<39:48, 1.69s/it]
Heres the visual.
Seems really dark, see how it plays out, might need mess with the parameters at bit.
for my regression model, while my outputs that don't require performing any y-transformations recieved permutation importances of: [8.489870495152069e-06, 2.8473137634987127e-05, 3.601992801842216e-05, 8.994490795259866e-05, 0.00014122290689252414, 0.00016634087419826262, 0.00018651374166957848, 0.0002985011378653167, 0.0003217476455222398, 0.0003648501915516668, 0.0005390584133917069, 0.0005510453761112769, 0.0005579521130572043, 0.0006692111046020154, 0.0007342147839425814, 0.0009495427176870068, 0.0010499860369553222, 0.0011171318800323078, 0.0014396640246170038, 0.0014551954296537551, 0.0016762460340624529, 0.002773101506971252, 0.0028425825210629868, 0.0029898274331477967, 0.003008392228598817, 0.0034062715902328537, 0.0036089692723145993, 0.005192301826945134, 0.005426078843544332, 0.008128894172522275, 0.00891206066296612, 0.012957150932567437, 0.01876308316741349, 0.0194401900313785, 0.019999771452021975, 0.024811335893464116, 0.027843860140545785, 0.046640726175167076, 0.06081653164310454] , why did the output that did require box-cox have permutation importances of these: ````[-24226294443.848663, -12645536262.108978, -8895211489.339962, -6409687232.491282, -6088093136.653414, -938402035.502533, 0.0, 0.0, 0.0, 0.000164794921875, 16940292.432662964, 95529664.47017364, 146881268.19153443, 232146763.68365327, 619801830.0394211, 772500704.3520828, 778769318.7313598, 881445589.4466995, 1019127781.606067, 1587857749.527005, 4347401829.157445, 8176495248.835803, 8916961444.561548, 10201667386.495699, 22008501374.868847, 26985242275.276268, 29101324791.81298, 29154799119.23103, 33261882890.59846, 35941789613.710495, 64786094845.843445, 109258007129.88943, 109541725905.22734, 148586347865.06268, 323553642632.7811, 389284519697.52673, 488638808637.0902, 613591860565.783, 1136668394142.4473]
for reference, before the output used box-cox, the feature importances were closer to the first example
have you considered Yeo-Johnston tranformation instead of using box-cox?
what advantage would yeo johnston have?
it can handle zero and negatives value . Box-cox is designed for postive i thought.
just a thought
yeah all of my values are positive
the values above arent model predictions, they're feature importances
oh gotcha
yeah...
like I really dont know why the permutation importances are that wack
i also tried log transformation but to little avail
like if nothing is wrong and the features are really that relative to each other, then ig it could make sense. but is there a chance the scaling might be messed up because i performed the transformation? as in i would need to rescale the permutation importances?
but if i dont use BC transformationg for my "y", even though the permutation importances look more "normal", the accuracy is also higher
Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [05:26<00:00, 1.19it/s]
Epoch [1/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 14.2622, Val PSNR: 14.6331, Train SSIM: 0.1447, Val SSIM: 0.0673
Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [41:31<00:00, 1.61s/it]
Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [05:11<00:00, 1.24it/s]
Epoch [2/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 15.8758, Val PSNR: 17.7024, Train SSIM: 0.2390, Val SSIM: 0.3333
Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [40:28<00:00, 1.57s/it]
Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [05:17<00:00, 1.22it/s]
Epoch [3/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 16.5871, Val PSNR: 16.8975, Train SSIM: 0.3003, Val SSIM: 0.3589
Training: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1551/1551 [41:02<00:00, 1.59s/it]
Evaluation: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 388/388 [05:41<00:00, 1.14it/s]
Epoch [4/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 16.6891, Val PSNR: 17.2012, Train SSIM: 0.3141, Val SSIM: 0.3452
Training: 11%|โโโโโโโโโโโโโโโโโโ | 175/1551 [04:53<37:03, 1.62s/it]```
Seems ok so far, the pictures are really coming to shape. Not so dark now. Im gonna have to experiment with different clip and sentence transformer models. Roberta seems like a good choice. I could a better clip model also, need to free up room though lol.
Yeah I think you probably want some plotting going on
Loss of 0.0000 is a bit sus though when the SSIM is changing
Also not sure to what extent you are using the sentence transformer for, but if you're not looking to fine tune the model parameters on Roberta, I'd recommend using intfloat' s variety of pre-trained models for mapping text into vector space
Is there any way possible that given a audio file which will be passed through OpenAI whisper that we can extract the phonemes out of that file?
So you want it to transcribe to IPA instead of written language?
Yes exactly
I don't think f-strings have to do anything with safety 
is it even possible to prevent prompt injections?
well, any object you pass there is gonna get converted to a string, sure, but I'm not sure how that really helps
ah
lmao, is this how you gonna automate job applications 
lol
(wait, like actually though?)
It would be cool, although ngl I would be sweating at the idea of it hallucinating or just straight up fucking up
"Ah yes Lisan is indeed a terrorist attempting to sacrifice people to the duck god so they can enhance their crypto bitcoin prector ai"
so i wanna go into AI but i dont know how, can enybody give me something to start
Andrew Ng's Machine Learning Specialization course
I'm currently look at my regression problem's feature importances through Sklearn's "permutation_importance" method. Because my output data is skewed, I'm using a Box-Cox transformation on my output to help reduce errors. However, when I plot the "permutation_importance" values of the Box-Coxed values, I get the attached image's plot, whose values range from -24226294443.848663 to 1136668394142.4473. However, if I do not perform y-transformation, my values appear far more reasonable, from 1.978362396543032e-07 to 0.049242178178920196. While I know the "permutation_importance" method returns relative, not absolute, values, why is there such a large discrepancy in between the transformed and non-transformed? And would the feature importance data even be valid if I am taking the importances on the transformed outputs? Any help is greatly appreciated.
just ask, no harm in just directly asking your question and rather hoping that someone answers than waiting for permission to ask, then ask, then wait
you can occasionally (not too frequently) also bump your question a bit for more attention I guess, but just ask it
P.S. RL is kinda not simple though, yeah
because I have created custom environment with help of gym, for my Pong game
int that environment everything is executing fine
but if ball touches one of the wall edges ( window of env) then it's shape changes and now I am not able to draw things
here is the window
that rectangle is striker, and that red dot is out ball ( I don't know how to convert it into circle)
so it works fine initially, the striker is also anticipating it's position
but when that ball hits wall, it should get reflected, I mean it's velocity should get reversed but I think it's shape is also getting converted
should I upload code?
anyone had any success with LLM-automated documentation generation?
What's the generation for originally
yes
okay!!
here we go!
I think ball is getting out of bound of the screen
I think I need to apply circle equation formula to represent accurate circle in that numpy array, but that's not requred now
For https://datalemur.com/questions/sql-bloomberg-stock-min-max-1
pls let me know, where the below solution is getting deviating from the problem.
SELECT ticker,
TO_CHAR(date, 'Mon-YYYY') highest_mth,
MAX(open) highest_open,
MIN(low) lowest_mth,
MIN(open) lowest_open
FROM stock_prices
GROUP BY ticker, TO_CHAR(date, 'Mon-YYYY')
I picked clip because its designed to learn the relationships of text and images . the clip image encoder is inherntly designed to align well with the clip txxt encoder.
I'm not sure if this is the right place to post this, but I am trying to program something that makes a simple query engine using phi3, the most important part is that this is running on Google Colab. The thing keeps alternating between two error messages, ReadTimeout: timed out and ConnectError: [Errno 99] Cannot assign requested address. If anyone has any ideas that would be great.
My code is ```py
Define system prompt and query wrapper prompt
system_prompt = "You are an instructor teaching people driving lessons about the rules of the road. Your goal is to answer questions as accurately as possible based on the instructions and context provided. Make sure to reference the document and explain how you got your answer"
query_wrapper_prompt = PromptTemplate("{query_str}")
Initialize the Llama model
llm = Ollama(
model="phi3",
#Changes how much it's allowed to generate
context_window=320,
max_new_tokens=100,
generate_kwargs={"do_sample": True},
# Give it the prompts from before
system_prompt=system_prompt,
query_wrapper_prompt=query_wrapper_prompt,
tokenizer_kwargs={"max_length": 100},
)
Set the LLM and other settings
Settings.llm = llm
Settings.chunk_size = 512
Create a vector store index from the documents
index = VectorStoreIndex.from_documents(documents)
Create a query engine from the index
query_engine = index.as_query_engine(include_text=False, response_mode="tree_summarize")
Define the predict function
def predict(input_text):
# Querys the engine from input
response = query_engine.query(input_text)
return str(response)
prediction = predict("What are signals used for?")
print(prediction)```
The data is a drivers manual btw
Hi
yeah so i needed to use the api
maybe ill apply for card tomorrow lol
thanks ill take a look
I added chatgpt-2 to introduce caption generation as well as the image generation. Lets see how this works out, the training just started.
Last night i set it up to train 15 epochs before bed, I woke up to the system rebooted. I was super bummed.
why rebooted?
Anyone have experience with google colab?
everyone here has experience with that!
looking into deep learning a lil bit. theres the idea of using a cost function, and then doing gradient descent to find optimal, weight and biases to tune. but the cost function just spits out a single number, how do you find a line from that on which to descend on?
good question, id have to check the logs
If I performed transformation to my x values to reduce skew, can I still use sklearn's "permutation_importances" to get feature importances? What about y- transformed data?
I seem to keep getting errors whenever I try to run my ollama code, I put all the details up above a bit
here
I am not familiar with ollama , right one will reply to you!, till then read teh docs sir!!
I've done immense amounts of googling for the exact same issues, this keeps happening over the past week
Try increasing the timeout in the Ollama init
Maybe related to timingout from the server.
let me see if I can run it locally. one sec
Doesnt it have a requested timeout parameter?
I cant load up my jupyter server, that shut down did something nasty to my file system in my wsl2 ubuntu instance. I cant write anything.
Try downloading Ollama on your machine, and subsequently, downloading your preferred LLM.
It should work fine without the connection error after you've done that.
I'll give it a shot
I found this online. https://onexception.dev/news/1081606/run-ollama-in-google-colab
This article provides a step-by-step guide on how to run Ollama, a powerful AI platform, on Google Colab, a free cloud-based Jupyter notebook environment. Learn how to set up your environment, install necessary packages, and configure your Ollama instance for optimal performance. Whether you're a seasoned AI developer or just getting started, th...
If for some reason you don't wanna run it locally, another alternative would be, using CrewAI to create an AI Agents, then plugging it to Groq so that the Agents could leverage top tier LLMs.
Groq doesn't have Phi3 though but they do have Llama3 8B and Llama3 70B, Mixtral, Whisper, and Gemma
And the beauty of it is, it cost $0.00 (they have a paid plan of course, however their freemium plan still packs a lot)
You shoukd check it out.
Hello! how can i run python in a super computer? i have a function f(n) that has a large time complexity and i can only perform values up to 30 in a reasonable amount of time in my computer. how can i get more values? would colab's gpu work for this?
GPUs are not magic, they can perform operations in parallel, but would be useless if your function cannot run efficiently in parallel - and even if it can in theory, it can take some effort to make it actually run in parallel
realistically you should reduce the time complexity of it by optimizing it
Damn thats kinda hard
Also would I need to modify it in order to run it in parallel
Thank you anyway!
I have nominal categorical training data (several categories) and a continuous numeric target, what statistic test do I use to see whats the best features to add to my model? When I google this question I see stuff like: https://pythonfordatascienceorg.wordpress.com/chi-square-python/#chi-square but this is for when they're both categories I think, not sure what to do when my target is float
Hi , Guys
Does anyone work rn in the programming field. i just Wana ask em some questions about the career and work . I'm fresh graduate ai programmer.
don't wait for a commitment. put your questions in the chat so that people can read them and answer them, if they view the channel
Shoot it from the hip, whats the questions? I'm just a UPS driver but maybe I can help ๐
Hey i dropped it in the #career-advice
hey
Epoch [2/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 16.1015, Val PSNR: 17.9194, Train SSIM: 0.2466, Val SSIM: 0.3354
Epoch [3/5], Train Loss: 0.0000, Val Loss: 0.0001, Train PSNR: 16.7126, Val PSNR: 17.9312, Train SSIM: 0.3012, Val SSIM: 0.3463```
I totally forgot to create a visual plot for these metrics. I'll get those up so you dont have to deal with this .
But here's the thing: the PSNR and SSIM metrics are improving, and the reconstructed images are looking better with each epoch. However, the train and validation losses are still super low (0.0000 and 0.0001). It's got me wondering if the gradient slope might not be measured correctly.
Is it possible that the model is actually learning well, even with these low loss values? Or could there be an issue with how the gradients are being calculated?
what loss function are you using?
so I use is a combination of reconstruction loss, vector quantization loss, and CLIP loss. The reconstruction loss is the MSE between the original and reconstructed images. The vector quantization loss includes the MSE between the quantized vectors and the encoder outputs with commitment cost, the CLIP loss measures the similarity between image and text features from the CLIP model
how do you combine them?
I use total_loss = recon_loss + vq_loss + clip_loss
if you're gonna plot them, might I suggest plotting each of them separately and the combined one as well? that might provide more insight into why it's so low
are you using cosine similarity? because if you are, you should invert it and normalize between 0 and 2 basically
good idea, thanks
i updated the code to plot each loss component separately now also the total loss combined , i also inverted the cosine similarty and normalized it in the range of 0-2 .
Hi, I am trying to run a CNN model and i keep getting this error, does anyone have an idea?
the error is telling you that the input you fed to the network is of the wrong shape and size
it's missing a dimension (which might not be a problem), but you fed in something of size 154 instead of 145
is this what you are referring to
yes
how do i pass the correct number to the model then
where did you create the training and testing data?
notice here you specified the input shape as the shape of X_train
so you need to make X_test have the same size in shape[1] and shape[2] as X_train does
is this what you are referring to
the very first line in this image
and then the 3rd line, where you tell the model "this is the only shape you will accept"
so naturally X_test needs to have that shape
thank you, worked
Guys how much math should I know to start off with PyTorch ??
uh, given that just removing "nerf" from that sentence goes from fun toy to seriously dangerous autonomous weapon, I feel like this is not the sort of thing you should be asking online
Frontend looks clean, this is what I need todo. I used flask and react for my frontend/backend but yours looks good. What did you end up using? Does look like its getting cut off at the end is this another bug?
@final kiln
bedrock ๐ฅ
async def enforce_spend_limit(self):
current_spend = await self.retrieval_service.get_current_spend(self.date)
if current_spend >= self.max_spend:
raise MaximumSpendError()
I do it on the full service ๐คก
there you go
Ok so I kinda the captions working, but not really lol . Wasnt what I was expecting. But maybe because its the first epoch ill see how it goes.
Are you using an API like chatgpt for this?
You should check out mine sometime. It definently fun to play around with. Its an ensemble learning setup i think my biggest model is a 3B blenderbot distil. But yours looks good buddy
Or just check it out I can make it private on github and give you a link, you can run it or check it out give me feedback, whatever really.
Oh my graph is done now!
kinda lol
wow remember how they use to be really dark? Now it looks a bit like a bright negative. This is the first epoch
is there a benifit for mapping a series in panda with another series instead of using a dictionary
I'm pretty sure that pandas just converts dictionaries to Series
If a RL agent achieves a maximum score on certain life cycle what would cause it to only hit it rarely instead of hitting it consistently. It proved it is capable?
Ex. Max score = 48 but average = 36
do you have updated code to share?
I really want this to work so I can scale it up
I think I'd recommend running a test with a reasonably small number of agents and seeing exactly what each score was at the end of a cycle with average 36
Wym
we know that the random chance used for exploration is going to cause it to skew
By the end the random chance is pretty much 0 and never triggers
Already verified that
okay I'd still wanna see the actual scores that are being averaged
so you could see if it's a few outliers or if the models are consistently not preforming well
Iโll rerun it later and ping you with the data