Skip to Main Content
Rust Programming Cookbook
book

Rust Programming Cookbook

by Claus Matzinger
October 2019
Intermediate to advanced content levelIntermediate to advanced
444 pages
10h 37m
English
Packt Publishing
Content preview from Rust Programming Cookbook

How it works...

Deep learning in Rust works—however, it comes with many strings attached. tch-rs (https://github.com/LaurentMazare/tch-rs) is a great framework if you already know some PyTorch and it lets you get into it right away. However, anyone who is new to the idea of machine learning should look at Python (and PyTorch) to get comfortable with the type of thinking that is required. tch-rs uses the C++ foundation of the Python version and provides a thin wrapper around the bindings it created. This means two things:

  • Most ideas of the Python version should apply to tch-rs.
  • The extensive C++ usage is likely very unsafe.

By using bindings, wrapped code is much more likely to leave some kind of memory unfreed thanks to the added layer ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Rust Web Programming

Rust Web Programming

Maxwell Flitton
The Complete Rust Programming Reference Guide

The Complete Rust Programming Reference Guide

Rahul Sharma, Vesa Kaihlavirta, Claus Matzinger

Publisher Resources

ISBN: 9781789530667Supplemental Content