<jupyter_start><jupyter_text>CHAPTER 6  Section 1<jupyter_code>import torch.nn as nn
import torch<jupyter_output><empty_output><jupyter_text>Neural Network cost functions are more complex and capable of approximating arbritrary functions because of their underlying operations of $\large w * x + b$ passed through an activation function $\large g(z)$ for all of its neurons in all the layers.What makes using deep neural networks so attractive is that it saves us from worrying too much about the exact function that represents our data—whether it is quadratic, piecewise polynomial,or something else. With a deep neural network model, we have a universalapproximator and a method to estimate its parameters. This approximator can be customizedto our needs, in terms of model capacity and its ability to model complicatedinput/output relationships, just by composing simple building blocks. PyTorch modules are the equivalent of layers on other frameworks. The modules are derived from the ```nn.Module``` class.<jupyter_code>nn.Module?<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.04784240150093809, 'fraction_numerical': 0.001876172607879925, 'mean_word_length': 5.973856209150327, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '292641', 'license': 'MIT', 'n_tokens_mistral': 263, 'n_tokens_neox': 252, 'n_words': 138, 'path': 'Chapter_6/Chapter_6.ipynb', 'repo_name': 'ramanshsharma2806/pytorch_practice', 'size': '1066'}