Open in app

Sign In

Write

Sign In

Yang Zhang
Yang Zhang

272 Followers

Home

About

Nov 30, 2022

Semantic Product Search

This post surveys recent techniques for semantic product search, especially neural network models. We introduce and classify a number of models, and describe the commonalities and differences in their characteristics such as model architecture, loss function, etc. …

Machine Learning

10 min read

Semantic Product Search
Semantic Product Search
Machine Learning

10 min read


Mar 11, 2021

Deep Learning Model for Product Category Prediction

Link to Library: https://github.com/yang-zhang/product_category Product category prediction model built with: pytorch huggingface/transformers pytorch-lightning and trained using Amazon product data. This library supports Predicting categories using the pretrained model. Training from scratch, with a transformers model as the starting point. Transfer learning from the pretrained model. Pretrained model

Deep Learning

4 min read

Deep Learning

4 min read


Nov 18, 2020

Pytorch Lightning for 🤗 Huggingface Transformers Language Modeling

yang-zhang/lightning-language-modeling Language Modeling Example with Pytorch Lightning and 🤗 Huggingface Transformers. Language modeling fine-tuning adapts…github.com Language Modeling Example with Pytorch Lightning and 🤗 Huggingface Transformers. Language modeling fine-tuning adapts a pre-trained language model to a new domain and benefits downstream tasks such as classification. The script here applies to fine-tuning masked language modeling (MLM) models include ALBERT, BERT, DistilBERT and RoBERTa, on a text dataset…

Pytorch

2 min read

Pytorch

2 min read


Sep 2, 2020

LaBSE Pytorch Model

I’ve converted LaBSE model weights to Pytorch model weight and shared on https://github.com/yang-zhang/labse-pytorch LaBSE is from Language-agnostic BERT Sentence Embedding by Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Naveen Arivazhagan, and Wei Wang of Google AI. Abstract from the paper We adapt multilingual BERT to produce language-agnostic sen- tence embeddings for 109 languages. While English…

Pytorch

2 min read

Pytorch

2 min read


Jun 22, 2020

Explain Pytorch Tensor.stride and Tensor.storage with code examples

Pytorch’s Tensor class has a storage() and a stride() method. They are not very often used directly, but can sometimes be helpful when you need to take a closer look at the underlying data. (I’ll show an example of using them to illustrate the difference between Tensor.expand() and Tensor.repeat() …

Python

3 min read

Python

3 min read


Aug 24, 2019

The “gradient” argument in Pytorch’s “backward” function — explained by examples

This post is some examples for the gradient argument in Pytorch's backward function. The math of backward(gradient) is explained in this tutorialand these threads (thread-1, thread-2), along with some examples. Those were very helpful, but I wish there were more examples on how the numbers in the example correspond to…

Machine Learning

8 min read

The “gradient” argument in Pytorch’s “backward” function — explained by examples
The “gradient” argument in Pytorch’s “backward” function — explained by examples
Machine Learning

8 min read


Jun 21, 2019

Table of cross-entropy loss at different probabilities

Cross-entropy loss is used for classification machine learning models. Often, as the machine learning model is being trained, the average value of this loss is printed on the screen. But it is not always obvious how good the model is doing from the looking at this value. The formula of…

Machine Learning

2 min read

Table of cross-entropy loss at different probabilities
Table of cross-entropy loss at different probabilities
Machine Learning

2 min read


May 1, 2019

Setup docker for Kaggle

Here are some notes on setting up docker for Kaggle (especially on installing and enabling nbextensions). I had to do this from time to time and wanted to write the steps down for the record. I put it here in case it’s useful for someone else. Why use docker for Kaggle Kaggle is a good…

Docker

3 min read

Docker

3 min read


Dec 5, 2018

Scaling in Neural Network Dropout Layers (with Pytorch code example)

For several times I confused myself over how and why a dropout layer scales its input. I’m writing down some notes before I forget again. Link to Jupyter notebook: In Pytorch doc it says: Furthermore, the outputs are scaled by a factor of 1/(1-p) during training. …

Machine Learning

3 min read

Scaling in Neural Network Dropout Layers (with Pytorch code example)
Scaling in Neural Network Dropout Layers (with Pytorch code example)
Machine Learning

3 min read


Nov 8, 2018

Multi-task Deep Learning Experiment using fastai Pytorch

This post is an abstract of a Jupyter notebook containing a line-by-line example of a multi-task deep learning model, implemented using the fastai v1 library for PyTorch. This model takes in an image of a human face and predicts their gender, race, and age. The notebook wants to show: an…

Machine Learning

5 min read

Multi-task Deep Learning Experiment using fastai Pytorch
Multi-task Deep Learning Experiment using fastai Pytorch
Machine Learning

5 min read

Yang Zhang

Yang Zhang

272 Followers

Software Engineering SMTS at Salesforce Commerce Cloud Einstein

Following
  • Gaurav Agrawal

    Gaurav Agrawal

  • Eugenio Culurciello

    Eugenio Culurciello

  • Aneesha Bakharia

    Aneesha Bakharia

  • Jonathan Hui

    Jonathan Hui

  • Qinyu Wang

    Qinyu Wang

See all (53)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams