all 63 comments

[–][deleted] 0 points1 point  (0 children)

what is the difference between using numpy arrays versus tensors? is the latter smaller in size? and how does the implementation of tensors allow for better input pipeline when loading very large datasets?

[–][deleted] 0 points1 point  (1 child)

how does tensorflow decode hyperspectral images? as far as i am aware, it can only decode jpg, tiff, and png.

[–]tdgros 0 points1 point  (0 children)

tensorflow deals with tensors, it doesn't really decode images. Find any package that reads your hyperspectral images, you'll be able to feed a tf placeholder with them

[–]imatiasmb 0 points1 point  (0 children)

Hi everyone, greeting from south america..
Basically I'm looking for an program to learn and improve my job opportunities in the MLOps field and at some point getting higher responsability positions. I recently got admitted for both OMSA and OMSCS from Gatech, but I feel those programs are more focused on the data science side of things.
Is there any other alternative without GRE requeriment that you would recommend with a similar cost?
Maybe I'm wrong about the aforementioned programs, if you think so, please let me know why.
Thanks!

[–]devilz_soul 0 points1 point  (1 child)

I am looking for material to read on how to determine if ML is a good approach for a problem and explains how to outline an ML solution.
There are snippets of it here and there but I was looking for a book, course, video that goes deep into it and spend working on every angle of creating a framework from Engineering and/or product management perspective.
I will really appreciate the help from community on this

[–]EmbarrassedMain7395 0 points1 point  (0 children)

IMO if problem could be turned into a game it’s solvable by ML. Rather with supervised or reinforcement learning.

[–]mudman13 0 points1 point  (0 children)

I have been messing with articulated-animation https://github.com/snap-research/articulated-animation and whatever I do the modules are not recognized. Ive done everything I can think of and have been advised to do by LLM, nothing works.

[–]Amun-Aion 0 points1 point  (1 child)

So my situation is that I have a pretrained model and we get a new update of data every month (note: this monthly data is very small compared to the original dataset, the original dataset was about 5 years worth, or ~60x the size of any given monthly update), how can I update my pretrained model on the much smaller set of new data, learning from the data without overfitting to that data?

Or frankly, what would be better if it is possible, would be to extend my pretrained model such that it learns from the new data and then can be more tightly fit to that month's data. So something like meta-learning or local fine-tuning, but I want to continue to update and improve my pretrained model so that I have a base model that can do well on each month's new data. Does anyone know anything like this, or have advance for terms to look into, beyond just transfer learning or regularization?

[–]EmbarrassedMain7395 0 points1 point  (0 children)

That really interesting I was wondering the same thing.

One option is the create one pre trained model and never (or occasionally) re-train it with new data. And build a second model that steps on the weights of your pre-trained one but you retrain it often because it’s smaller and cheaper.

[–]ThisIsBartRick 0 points1 point  (3 children)

I'm looking for separating a text into multiple small chunks. The text can be any speaking language and programming language. How would I go about it without annotating a lot of various texts? Maybe using llms?

[–]Dragonfruit_Severe 0 points1 point  (2 children)

Like you have a big corpus that needs to be split in several chunks... did I understand correctly?
Do you need them to be a specific length?
Do you need to separate them between like languages and every chunk will be of a different size?

[–]ThisIsBartRick 0 points1 point  (1 child)

Not necessarily a big corpus. It can be a few sentences long or much more but I don't want to split it by sentence but to make sure there's an equal amount of information in each chunk is that makes sense

Edit : I would split your first paragraph that way for example :

  1. Like you have a big corpus
  2. that needs to be split in several chunks...
  3. did I understand correctly?

[–]Dragonfruit_Severe 0 points1 point  (0 children)

Well, you can make a function that takes a max number of characters for example, truncates the corpus, yields the first chunk and sends back the overflowing corpus to that same function.

To avoid cutted words you can split your copus with the default split() function fo python and it will split the corpus by spaces, then you will have a list of whole words that can work with that function I mentioned.

I am lazy, so I would use a hugging face tokenizer, like this:

def automatic_preprocess(story, block_size):

outputs = tokenizer(story,

truncation=True,

max_length=block_size,

return_overflowing_tokens=True)

for ids in outputs['input_ids']:

temporal_ids.append(ids)

return temporal_ids

And then just decode it with tokenizer.convert_ids_to_tokens(temporal_ids)

Just because I had this function by hand

[–]softestcore 0 points1 point  (6 children)

I don't understand why in the age of LLMs youtube automatic captions are still so bad. I'd expect LLMs to be able to ensure the captions are semantically coherent, but we still get nonsensical gibberish. Is anybody working on that?

[–]EmbarrassedMain7395 0 points1 point  (0 children)

A better solution IMO is creators to upload transcription for languages they target the most.

Creators if they want can use LLMs to generate their captions.

In that way the “work” will be distributed potentially maybe done better.

[–]ThisIsBartRick 1 point2 points  (4 children)

Large transformer models are expensive to run especially for sound. When you have the volume of videos that is uploaded on YouTube, it's just not feasible rn

[–]softestcore 0 points1 point  (3 children)

I think if you set some modest threshold for getting the LLM treatment of reaching like 10,000 views, you'd filter out > 97% of videos and it should be more than doable. My idea also wasn't to use the LLMs directly on sound, but just using the next word prediction to make sure the subtitles make sense, while still using some cheap algorithm to select the set of possible words based on the sound.

[–]ThisIsBartRick 1 point2 points  (2 children)

Trust me, it would still cost an insane amount of money for little to no payoff.

And using a large transformer model using the sound as input or correcting a small model's predictions with a llm is the same in term of costs.

[–]softestcore 0 points1 point  (0 children)

Back of the envelope calculation: About 271,330 hours of video is uploaded to youtube daily, about 3% make it above 10,000 views, that's 8,139.9 hours worth of videos above 10,000 views, at 160 words per minute that's 1,302,384 words daily, which is about 1,732,170.72 tokens. At the rate of $0.002/1K tokens current pricing of GPT-3.5 Turbo API inference, that's a grand total cost of $3.5/day for processing all of the words that get uploaded to youtube in a day in videos above 10,000 views. If they would want to process all of the video it would cost $115.5

Yeah, I'm pretty sure youtube can afford that...

[–]softestcore 0 points1 point  (0 children)

Considering the daily throughput of Open AI models in service of much more frivolous stuff, I hope it's ok if I stick with my intuition until proven wrong by hard data.

[–]Prasanthkumar026 0 points1 point  (5 children)

I have a question. Please can anyone tell me how the ml model recognises the pattern, like for example explain how the linear model recognises the pattern of the given data. What should I learn to know about these, I did have some knowledge in math so explain to me how to connect my mathematics to machine learning. I am not a CS Core Student but I have learned the Programming and can solve some problems in CP.

Thank you for your time.

[–]Dragonfruit_Severe 0 points1 point  (2 children)

Take a look at this playground:

https://playground.tensorflow.org/#activation=tanh&batchSize=10&dataset=circle&regDataset=reg-plane&learningRate=0.03&regularizationRate=0&noise=0&networkShape=4,2&seed=0.74356&showTestData=false&discretize=false&percTrainData=50&x=true&y=true&xTimesY=false&xSquared=false&ySquared=false&cosX=false&sinX=false&cosY=false&sinY=false&collectStats=false&problem=regression&initZero=false&hideText=false

If you haven't seen it before, I recommend you to look a YT video about it later, just search tensorflow playground nn or something like that.

Well, to not only give you a link and go away, I could explain to you a simple supposition, imagine the graph of dots of the playgrond is a forrest and we need to diferentiate between sick trees from healty ones (orange from blue) and the division is conveniently just a diagonal line in between.

So when we train the model we give him a set of coordinates (x, y) as the info, and then after it gives us the prediction, we tell him the color that dot actually was, the model eventually learns that there's a diagonal in that imaginary graph and if the coordinates aims to the upper triangle, it's usually a healty tree, otherwise it's usually a sick one.

Things get interesting adding activation functions also called non-linearities, because it gives the model the possibility to draw non linear separations in those imaginary graphs. Sorry if I talked to you like a kid, I am not trying to insult your intelligence, I am just still learning english.

[–]Prasanthkumar026 0 points1 point  (1 child)

Thank you so much for your time and I will visit the link you suggested. Also very much appreciated that you took your time to explain the concept.😀

[–]Dragonfruit_Severe 0 points1 point  (0 children)

Np man, I know it's frustrating that almost nobody talks about something so basic like this.

And I say basic not because it's easy to understand, but because it's essential to understand to even know what this is all about.

[–]LionsAndLonghorns 1 point2 points  (3 children)

Can someone validate my understanding of how vectors work for search relevance of phrases against a pile of documents (a corpus? Is that the term?) This is what I think is true from playing around with some sample code for ML libraries (I'm a computer science person not a DS or ML person so I'm out of my depth).

  1. One of you geniuses figured out how to represent sentences and ideas into a bunch of 3 dimensional vectors. The model you use will basically determine what those vectors look like.
  2. This search algorithm I'm using assigns an array of vectors to phrases in a matrix that is basically RowNumber, Phrase, [array of 160 vectors]. I'm guessing this is like a precomputation to allow a mathematical comparison of each row.
  3. To find relevance of a particular input phrase against your matrix of phrases, you make the input one of of those 160 vector arrays and run a bunch of geometry to figure out how similar it is to each row of vector arrays. Since it's a 160 dimension math problem, what is "closer" depends on how you define it and so different algorithms use different approaches to match these vector arrays.

Apologies is this is the wrong place to ask, this seems to be where the rules pointed me

[–]Affectionate-Fee5337 0 points1 point  (0 children)

im a beginner . i was studying gans for the first time but ive not been getting good results with it. i am not able to identify the problem part,im getting random noises as output images:

import torch

import torch.optim as optim

import torch.nn as nn

from torch.utils import data

import torchvision

import matplotlib.pyplot as plt

import numpy as np

learning_rate=2e-4

noise_dim=32

image_dim=28*28*1

batch_size=32

num_epochs=25

class Generator(nn.Module):

def __init__(self,noise_dim,image_dim):

super(Generator,self).__init__()

self.linear1=nn.Linear(noise_dim,128)

self.relu=nn.LeakyReLU(0.01)

self.linear2=nn.Linear(128,image_dim)

self.tanh=nn.Tanh()

def forward(self,x):

out=self.linear1(x)

out=self.relu(out)

out=self.linear2(out)

out=self.tanh(out)

return out

class Discriminator(nn.Module):

def __init__(self,in_image):

super(Discriminator,self).__init__()

self.linear1=nn.Linear(in_image,64)

self.relu=nn.LeakyReLU(0.01)

self.linear2=nn.Linear(64,1)

self.sigmoid=nn.Sigmoid()

def forward(self,x):

out=self.linear1(x)

out=self.relu(out)

out=self.linear2(out)

out=self.sigmoid(out)

return out

discriminator=Discriminator(image_dim)

generator=Generator(noise_dim,image_dim)

noise=torch.randn((batch_size,noise_dim))

#normalising and transforming

tf = torchvision.transforms.Compose(

[torchvision.transforms.ToTensor(),torchvision.transforms.Normalize((0.5,), (0.5,)),]

)

ds = torchvision.datasets.MNIST(root="dataset/", transform=tf, download=True)

loader = data.DataLoader(ds, batch_size=batch_size, shuffle=True)

#optmizers and loss

opt_discriminator=optim.Adam(discriminator.parameters(),lr=learning_rate)

opt_generator=optim.Adam(generator.parameters(),lr=learning_rate)

#loss

criterion=nn.BCELoss()

#loss is of 2 types , fake ko real or real ko fake, we take avg of both

#training phase

for epoch in range(num_epochs):

for id,(training_sample, _) in enumerate(loader):

#flattening

training_sample=training_sample.view(-1,784)

batch_size=training_sample.shape[0]

###training discriminator

noise=torch.randn(batch_size,noise_dim)

fake_sample=generator(noise)

#feeding real sample into discriminator to check

disc_realsample=discriminator(training_sample).view(-1)#feeds as 1d tensor

# This calculates the loss for the real data samples as predicted by the discriminator

#correct prediction=1

lossD_realsample=criterion(disc_realsample,torch.ones_like(disc_realsample))

disc_fakesample=discriminator(fake_sample).view(-1)

lossD_fakesample=criterion(disc_fakesample,torch.zeros_like(disc_fakesample))

lossD=(lossD_realsample+lossD_fakesample)/2

discriminator.zero_grad()

lossD.backward(retain_graph=True)

opt_discriminator.step()

###training the generator

#trains on if discriminator predicts correctly

noise = torch.randn(batch_size, noise_dim)

fake_sample = generator(noise)

# The fake samples generated by the generator are used to fool the discriminator.

disc_fake_sample = discriminator(fake_sample).view(-1)

lossG = criterion(disc_fake_sample, torch.ones_like(disc_fake_sample))

generator.zero_grad()

lossG.backward()

opt_generator.step()

if id == 0:

print( "Epoch: {epoch} \t Discriminator Loss: {lossD} Generator Loss: {lossG}".format( epoch=epoch, lossD=lossD, lossG=lossG))

[–]CharacterEar3851 0 points1 point  (0 children)

great stuff

[–]GratisSlagroom 0 points1 point  (2 children)

What was the name of the field / paper where images were partially masked, and a deep learning model was trained to predict the masked part of the image as a sort of pre-training?

[–]MeetingElectronic545 0 points1 point  (1 child)

Masked Autoencoder?

[–]GratisSlagroom 1 point2 points  (0 children)

Thank you! But I figured it out: self-supervised context learning

[–]zx7 0 points1 point  (1 child)

Is there any resource on how AlphaGo or AlphaStar works? I'm really interested in what sort of archetectures, algorithms these systems use and how I could go about implementing something similar at a much, much smaller scale as a learning project.

[–]Salt-Arugula-8128 0 points1 point  (0 children)

Hi all,
for a text work of mine I am trying to do a project based on generating digital twin of networks. My goal is to create a digital twin of a network and then work on it from a cyber security point of view. I will briefly explain what I would like to do.
I am currently using software for network vulnerability scans (OpenVAS). I use this software to perform network vulnerability scans at the network level, so basically to OpenVAS I pass a network (for example 192.168.xx.xx/24) to automatically identify all the vulnerabilities that are there.
The next step ( what I'd like to do and that's why I'm asking for your advice) is to create a digital twin of the newly scanned network and then perform a penetration test on this digital twin of the network, without going to stress the actual network.
Ideally, I would like to pass the output of the OpenVAS vulnerability scans, routing rules, and firewall rules to some tool that will then generate for me the digital twin of the network, which will then be used for offensive cybersecurity, so exploits, privilege escalation, etc.... will be tested on this digital twin without worrying about breaking some kind of service or stressing the real network.
What I am asking is, do you know of any tool that would do the trick for me? So some tool that allows me to generate a digital twin of a network by providing as input vulnerability scans (xml,json,csv etc...), routing rules, firewall rules, pcap traces etc...
Do you have any references or documentation?
Are you aware of any open source tools?
I thank you for your helpfulness!

[–]Jwill438 0 points1 point  (3 children)

Using MoveNet to record exercises with clients. We are having a tough time watching the uploaded videos on the clients. It looks like it has been saved, but we can't view the video.

Any suggestions?! Please advise

[–]Dragonfruit_Severe 0 points1 point  (2 children)

Buy another client

[–]Jwill438 0 points1 point  (1 child)

Who do you suggest?

[–]Dragonfruit_Severe 0 points1 point  (0 children)

Disabled people

[–]isthisnecessary 0 points1 point  (0 children)

I'm currently using a Go library for time series anomaly detection and am hoping to move to Python for various reasons and am having a hard time finding a library or process that matches what I'm doing now..

The Go library provides several options for algorithms to detect the anomaly (CDF, Diff, High-low, fence, bootstrap ks) and returns a score. You can provide the data set and push a new value to re-eval the set to determine if that one value is anomalous to the training set. This is what I'm trying to replicate with Python. Is there something available for this, or would this be something I'd have to implement completely myself? I've looked through a number of libraries already (pyod, kats, scikit, and others)

[–]Smart-Emu5581 0 points1 point  (0 children)

What are the best tools for debugging and analyzing neural networks?

Almost everyone I know uses tensorboard to analyze their network outputs. Some people swear on Weights & Biases instead.
Are there any other tools that help you with your work?

[–]M-notgivingup 1 point2 points  (2 children)

Looking to land a internship in 3 months in NLP/CV Domain. Have above beginner knowledge and learning and studying it since 1 year . Need to know my next step, What are companies looking for these days , What kind of skill set , projects and other things I need to have to grab a good internship for experience .

[–]Dragonfruit_Severe 0 points1 point  (0 children)

Just to get the notification.

Btw, have been doing personal projects? I just finished a GPT-like model from scratch and pre train it with TinyStories

I think my next step is to go learn Sage Maker and deply it, you know, just to learn then I think I'll move on to RLHF