applied machine learning, part 4: embedded systems video -凯发k8网页登录
from the series: applied machine learning
walk through several key techniques and best practices for running your machine learning model on embedded devices.
the video discusses options for making your model faster and reducing its memory footprint, including automatic c/c code generation, feature selection, and model reduction.
the phrase “machine learning” brings to mind complex algorithms that use lots of computations to train a model. but computations on “embedded devices” are limited in the amount of memory and compute available.
now, when i say “embedded devices,” i’m referring to objects with a special-purpose computing system, so think of things like a household appliance or sensors in an autonomous vehicle.
today, we’ll discuss the different factors to keep in mind when preparing your machine learning model for an embedded device.
different types of models require different amounts of memory and time in order to make a prediction. for example, single decision trees are fast and require a small amount of memory. nearest neighbor methods are slower and require more memory, so you might not want to use them for embedded applications.
another thing to keep in mind when determining which models to use on an embedded device is how you will get your model to the device.
most embedded systems are programmed in low-level languages such as c.
but machine learning is typically done in high-level interpreted languages such as matlab, python, or r.
if you have to maintain code bases in 2 different languages, it is going to be very painful to keep them in sync.
matlab provides tools that automatically convert a machine learning model to c code, so you don’t need to manually implement the model in c separately.
so what if, after converting a model to c, you find out that it isn’t going to meet the requirements of our system? maybe the memory footprint is too big, or the model takes too long to make predictions?
you could try other types of models and see if the code meets the requirements. maybe start with a simple model such as a decision tree.
alternatively, you could go back earlier in the process and see if you can reduce the number of features in the model. you can use tools such as neighborhood component analysis, which are useful for determining the impact that the features have on the results. if you see that some features are weighted low, you could drop them from our model, making our model more concise.
certain types of models have different reduction techniques associated with them. for decision trees, you can use pruning techniques, where you drop nodes that provide the smallest accuracy improvement.
one other approach is to look at reducing the memory required for storing the model parameters. for example, seeing if the model can be converted to a fixed-point representation that maintains acceptable accuracy.
depending on your use case, any of these tactics may be appropriate. hardware considerations, network connections, and budget are all key factors that will influence design decisions.
that was just a quick overview of embedding machine learning models. for more information on preparing models for embedded devices, see the links below.
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 mathworks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- (español)
- (english)
- (english)
欧洲
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
亚太
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)