Appendix A. Chapter Review Answers

Chapter 1: AI Is Magic

  1. Machine learning is a subset of AI that is focused on systems that learn from data to improve their performance.

  2. You can recommend that the best way to get results would be to collect a set of labeled data, so you can perform supervised or semisupervised training, or you could offer an unsupervised or reinforcement-based approach.

  3. Reinforcement learning is the most likely fit for applying machine learning to a game.

  4. No, machine learning is a subset of AI.

  5. No, a model contains structure and numbers but is generally exponentially smaller than the training data it’s seen.

  6. Data is often broken into train and test sets, with some people utilizing validation sets. The training dataset is always the largest.

Chapter 2: Introducing TensorFlow.js

  1. No, TensorFlow works directly with Python. You need TensorFlow.js to run AI in the browser.

  2. Yes, TensorFlow.js has access to the browser GPU via WebGL, and if you load tensorflow/tfjs-node-gpu, you can access the server GPU via CUDA.

  3. No, the TensorFlow.js vanilla and Node.js builds both function without CUDA.

  4. You’ll be served the latest version of that library, which may include breaking changes on your site.

  5. The classifier returns an array of violations and their percentage of likeliness for being true.

  6. A threshold is an optional parameter that can be passed to the model’s load call.

  7. No, the Toxicity model code requires the network weights for the model, ...

Get Learning TensorFlow.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.