<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>neural network on Tom Roth</title><link>https://tomroth.dev/tags/neural-network/</link><description>Recent content in neural network on Tom Roth</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 07 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://tomroth.dev/tags/neural-network/index.xml" rel="self" type="application/rss+xml"/><item><title>How does weight-tying work in a RNN?</title><link>https://tomroth.dev/weight_tying/</link><pubDate>Fri, 07 Oct 2022 00:00:00 +0000</pubDate><guid>https://tomroth.dev/weight_tying/</guid><description>Weight-tying is where you have a language model and use the same weight matrix for the input-to-embedding layer (the input embedding) and the hidden-to-softmax layer (the output embedding). The idea is that these two matrices contain essentially the same information, each having a row per word in the vocabulary. The concept seems to be first mentioned by Press and Wolf in 2016.
Below we illustrate this with a RNN. This post assumes that you are somewhat familiar already with how a RNN works.</description></item><item><title>A simple CNN with Pytorch</title><link>https://tomroth.dev/pytorch-cnn/</link><pubDate>Wed, 14 Apr 2021 00:00:00 +0000</pubDate><guid>https://tomroth.dev/pytorch-cnn/</guid><description>Find the code for this blog post here: https://github.com/puzzler10/simple_pytorch_cnn
We will build a classifier on CIFAR10 to predict the class of each image, using PyTorch along the way.
This is basically following along with the official Pytorch tutorial except I add rough notes to explain things as I go. There were a lot of things I didn&amp;rsquo;t find straightforward, so hopefully this piece can help someone else out there. If you&amp;rsquo;re reading this, I recommend having both this article and the Pytorch tutorial open.</description></item><item><title>On invariance adversarial attacks</title><link>https://tomroth.dev/invariance/</link><pubDate>Fri, 06 Mar 2020 00:00:00 +0000</pubDate><guid>https://tomroth.dev/invariance/</guid><description>Sensitivity-based adversarial attacks Link to heading Neural networks are vulnerable to adversarial attack, and there&amp;rsquo;s a lot of talk about this. There are many definitions of an adversarial attack, but let&amp;rsquo;s go with this one: an input to a model designed to produce an incorrect output. Models can run on many different types of data (text, audio, tabular) but let’s use images as a working example.
The most well-known kind of adversarial attack is to add some kind of perturbation to an image to make a classifier mislabel it.</description></item><item><title>Notes on DeepFool</title><link>https://tomroth.dev/deepfool/</link><pubDate>Thu, 27 Feb 2020 00:00:00 +0000</pubDate><guid>https://tomroth.dev/deepfool/</guid><description>Paper: Deepfool: a simple and accurate method to fool deep neural networks. (Moosavi-Dezfooli et al, 2016).
Idea: If you want to find an adversarial example to an image, look for the closest decision boundary, and then move the image towards a linear approximation of the decision boundary by orthogonally projecting it onto the boundary. Once it crosses the boundary it will be an adversarial image.
Background Link to heading Affine functions.</description></item><item><title>Exploding and vanishing gradients</title><link>https://tomroth.dev/exploding_vanishing_gradients/</link><pubDate>Wed, 19 Feb 2020 00:00:00 +0000</pubDate><guid>https://tomroth.dev/exploding_vanishing_gradients/</guid><description>The following code explores how gradients explode or vanish when backpropagating through a neural network. It depends on the type of activation function you are using and how many layers you have in the network.
Observations for some activation functions:
sigmoid tends to lead to vanishing gradient sometimes with relu you get a lot of zeros in the gradient. I didn&amp;rsquo;t see any vanishing gradient with relu, but there was exploding gradient.</description></item><item><title>Measuring the Intrinsic Dimension of Objective Landscapes (2018) - summary</title><link>https://tomroth.dev/intdim/</link><pubDate>Tue, 07 Jan 2020 00:00:00 +0000</pubDate><guid>https://tomroth.dev/intdim/</guid><description>The paper in one sentence. The Pareto principle for neural networks: what’s the least number of parameters needed for to achieve most of the results?
Structure of this article. I give an introduction to objective landscapes and talk about how to define solutions. I use these concepts to describe the subspace training method. Finally, I summarise the key results of the paper.
Objective landscapes Link to heading For every combination of neural network architecture and dataset, the shape of the objective/loss function is fixed.</description></item><item><title>Let's build a DQN: neural network architectures</title><link>https://tomroth.dev/dqn-nnet/</link><pubDate>Thu, 01 Nov 2018 00:00:00 +0000</pubDate><guid>https://tomroth.dev/dqn-nnet/</guid><description>After building the basic DQN, I started trying some different neural network architectures. I found vastly different results between them.
Spoiler: more complex doesn&amp;rsquo;t equal better. Almost the opposite.
Here are some results for the rewards obtained in each episode. I trained these models on cartpole-v1. Each was trained for 1000 episodes.
Disclaimer: I did only one run with each architectures. I kept other hyperparameters the same as the previous post, but there are likely some interaction effects unaccounted for.</description></item><item><title>Let's build a DQN: simple implementation</title><link>https://tomroth.dev/dqn-simple/</link><pubDate>Wed, 31 Oct 2018 00:00:00 +0000</pubDate><guid>https://tomroth.dev/dqn-simple/</guid><description>Click the image above to see the source code.
Last time, we established some theory for our DQN. Now it’s time to implement it.
We won’t build a full DQN from the DeepMind paper, not yet. Instead we’ll build a simplified version. I call it the basic DQN.
The basic DQN is the same as the full DQN, but missing a target network and reward clipping. We’ll get to that in the next post.</description></item><item><title>Let's build a DQN: basics</title><link>https://tomroth.dev/dqn-basics/</link><pubDate>Tue, 23 Oct 2018 00:00:00 +0000</pubDate><guid>https://tomroth.dev/dqn-basics/</guid><description>In February 2015, Google Brain published a paper combining deep neural networks and reinforcement learning for the first time - called DQN (deep q-network). It was a landmark moment.
DQN was the first algorithm that could successfully play a wide range of Atari games. Other algorithms at the time could perform well at a single game but couldn’t generalise across games. Impressively, DQN was able to perform above human level at a range of Atari games using only the screen pixels as input.</description></item></channel></rss>