Week 6 - BALT 4364 - PyTorch
PyTorch
Pytorch is an open-source ML library associated with fast.ai and developed with Facebook's AI research lab, FAIR. Tensors are the building blocks that store multi-dimensional arrays of numerical data, similar to NumPy but leveraged with graphics processing power (GPU).
To create a tensor, use the torch.tensor() function. Using Google Colab, it would look something like this:
import torch
# Create a tensor from a list
x = torch.tensor([1,2,3])
print (x)
More tutorials can be found here: https://pytorch.org/tutorials/beginner/colab.html
Various operations are possible, including addition and multiplication. However, its real power comes alive when it is trained on a certain dataset. Training a dataset within a model is one thing, but testing it is the most important part because this directly assesses the model's performance and ability to present unseen data. In this area, overfitting can be determined as sometimes a model will perform well on training data but poorly on the testing side where we just established is the most important part.
Training and testing datasets are pretty advanced, but luckily, Google Colab has examples you can utilize without adding code and following multiple steps. Even without advanced knowledge, someone could utilize these models in a business scenario to help with forecasting and projections. These models can eventually be implemented into a web application for others to use. Depending on what it is, there could be a lot of interest in the model created! Use your imagination!

Comments
Post a Comment