Machine Learning Engineering
Signal Processing – Filters
Never really have been working with signals before, I first needed a basic fundamental understanding of filters. The following are my notes about low-pass and high-pass filters taking of the youtube video made by ritvikmath. Terminology low frequency: signal doesn’t…
How to divide two timestamps in equal chunks
TLDR: pd.date_range(start=s, end=e, periods=period) Task Given two timestamps, how to create equally spaced out times between them? My first thought, when it comes to creating evenly spaced numbers is using linspace. This would require transforming the datetimes into unix timestamps,…
PyTorch – expected scalar type Float but found Double
TLDR: The default datatype of a numpy array translates to double/float64. If a Tensor is created from that array using torch.as_tensor it will adopt that datatype, which is not compatible with the default datatype of a neural network model which…
Training languagemodel – RuntimeError the expanded size of the tensor (100) must match the existing size (64) at non singleton dimension 1.
Context I trained a new languagemodel from scratch using huggingface’ framework and a preconfiguration of Roberta Model on a custom dataset. Now i wanted to vectorize a new dataset using the pretrained model. Observation I receive an error: RuntimeError the…
SentenceTransformer – float object is not subscriptable
TLDR: np.nan objects are of type float Observation I was trying to apply the SentenceTransformer (v2.2.0) on a list of custom documents to create embeddings for each of them, however i would get the error “TypeError: ‘float’ object is not…
Visual Explanation of Multi Head Attention
Why does changing the number of heads not change the number of parameters in the model? – That was the question i was asking myself. After drawing out the matrix multiplication and having gained the insight, i’d like to share…
How to evaluate the Transformer Trainer
If you initialized a Trainer object, it will do the training boiler plate for you. Using the TrainingArguments, you can additionally customize your training process. One important argument is the evaluation_strategy which is set to “no” by default, thus no…
Difference between the Tokenizer and the PreTrainedTokenizer class
I just got tossed into the cold water of the 🤗 Transformer framework and had some initial troubles with understanding the components. I’d like to write down my understanding of the Tokenizer and on how to add special_tokens to them,…
How To Calculate the mean Average Precision (mAP) in object detection- an overview
As a grad student, just entering the world of object detection i found it quite helpful, that there are a lot of resources especially blog posts, made easy to quickly digest complex concepts and ideas. If you type in related…