New answers tagged

2

Take a look at: Deep Reinforcement Learning for Automated Stock Trading where the 30 Dow Jones stocks are trained using OpenAI Gym. The code is here and the published paper is here. An excerpt from the paper: We train a deep reinforcement learning agent and obtain an ensemble trading strategy using three actor-critic based algorithms: Proximal Policy ...


0

Yes, the optimal learning rate will differ for every change you make in the network. In fact finding the optimal learning rate is very computationally expensive, so you will normally only get a rough guess anyway. The learning rate is used to traverse an N dimensional loss landscape that changes drastically with even the smallest differences. If you add one ...


1

I think this is best explained using an analogy. Also you seen to have the misconception that you don't tune hyper-parameters for training data. You want to increase the accuracy of the training set AND validation set at the same time, but the validation set is more important so you want to maximise that accuracy more. Imagine you had a toddler, and you were ...


0

Idea is to optimize with regards to unseen data in each step in order to avoid overfitting and data leakage so that the final network will be most generalizable to novel data. First, you initialize your network weights randomly. For those weights, training data is unseen so network is optimized with regards to loss function that is calculated using training ...


-1

You generally split your data into two segements, a training set, and a test set. The test set is used to evaluate the performance of the training, and thus has to be distinct from the training data — the idea is that the data has not been previously seen by the trained system. As far as I am aware, the test set is only ever used to evaluate the performance ...


1

All modern frameworks for deep learning (PyTorch, Jax, Tensorflow) support automatic differentation. These operations can be easily implemented. Here I write, how it would look like in PyTorch: class Net(nn.Module): def __init__(self): super().__init__() self.a = nn.Parameter(torch.randn(1)) self.b = nn.Parameter(torch.randn(...


1

Learning "border effects" is another reason to use padding at least in convolutional neural networks. This paper specifically looks at 2D CNNs for image processing. In my experience, I use pre-padding with 1D CNNs for NLP so my model can learn morphological affixes.


0

You already figured out much of the problem. You can solve it with sequence models like LSTM/GRU. One-hot encode word-types. Assume there are types of [properNoun, adjective, noun] as you said. Then "Mike" will be represented as a vector, [1,0,0], "fast" as [0,1,0], and "airplane" as [0,0,1]. Summing up these, you will train a ...


0

It’s a tradeoff allowing you to fit a larger model into a fixed RAM budget (ie the size of your GPU). Whether this is a good tradeoff is model- and data-specific, but anecdotally I’ve had good luck with it and usually use half precision to good effect (NLP, mostly).


1

I think the answer to your question is much more a rule of thumb than an appropriate analytical answer. First of all, I would like to remark that Batch Normalization [1] are applied most commonly to convolutional layer, constituting what is called a "convolutional block" (Convolution + Batch Normalization + Activation). Thus, for giving you an idea ...


2

The fact is you can always express an affine transformation as a linear transformation (more convenient because it is just a matrix/dot product). For instance, given an input $\textbf{x}=[x_1, ..., x_n]$, some weights $\textbf{a} = [a_1, a_2, ..., a_n]$ and a bias $b \in \mathbb{R}$, you can express the affine operation $y = \textbf{a}\cdot \textbf{x} + b$ ...


4

I'm sure you can use dropout in any parameterized model, but I suspect it'll only really be helpful if you have enough parameters/nodes. Also dropout in neural nets has a Bayesian meaning, Yarin Gal for example has done lots of work on this. In your decision tree example, I believe you're talking about pruning, which is different. In that context you're ...


2

In the automatic differentiation procedure after backward pass the gradient with respect to the scalar is added to the current gradient. Without calling zero_grad you will have the sum of all gradients, calcluated before, with the current gradient. Therefore, optimizer.step() will do not this: w = w - eta * grad L[i] # L[i] - loss function for the i-th ...


1

The convolution operation performed by most CNNs that you will find (on the web) assumes that the signals/functions are discrete and 2-dimensional (e.g. images can be viewed as 2-dimensional discrete signals), although this does not have to be the case. In fact, 1D and 3D convolutions are also implemented in several deep learning libraries (see here for an ...


2

In linear algebra, a linear transformation (aka linear map or linear transform) $f: \mathcal{V} \rightarrow \mathcal{W}$ is a function that satisfies the following two conditions $f(u + v)=f(u)+f(v)$ (additivity) $f(\alpha u) = \alpha f(u)$ (scalar multiplication), where $u$ and $v$ vectors (i.e. elements of a vector space, which can also be $\mathbb{R}$ [...


2

You can see some labels at https://www.tensorflow.org/datasets/catalog/emnist. It goes like this: ‘0’-‘9’ are 0-9 ‘A’-‘Z’ are 10-35 ‘a’-‘z’ are 36-61


0

Without the specific context, I cannot give a definitive answer, but it's very likely that a "differentiable architecture" refers to a neural network that represents/computes a differentiable function (so you need to use differentiable activation functions, such as the sigmoid), i.e. you can take the partial derivatives of the loss function with ...


0

Use the benchmarked algorithms or research papers will be a good start. Addition to that use the open sourced Bert GPT 2 like architectures is a good start.


0

Look for padding. There are even versions of it: pre-padding, post-padding. https://stackoverflow.com/questions/46298793/how-does-choosing-between-pre-and-post-zero-padding-of-sequences-impact-results


0

A recurrent neural network (RNN, specifically either an LSTM or GRU) will work well for variable length sequences like you’ve described. Assuming the order of the sequence is meaningful (I.e. you can’t just break up the sequence into individual inputs and associated target value) an RNN model will learn how the sequence of inputs maps to the sequence of ...


2

Neural networks are not invariant to translations, but equivariant, Invariance vs Equivariance Suppose we have input $x$ and the output $y=f(x)$ of some map between spaces $X$ and $Y$. We apply transformation $T$ in the input domain. For general map,output will change in some complicated and unpredictable way. However, for certain class of maps, change of ...


3

A smooth function is usually defined to be a function that is $n$-times continuously differentiable, which means that $f$, $f'$, $\dots$, $f^{(n - 1)}$ are all differentiable and $f^{(n)}$ is continuous. Such functions are also called $C^n$ functions. It can be a bit of a vague term; some people might even stretch the definition and say any continuous ...


1

The input layer is just an abstraction for defining the number and/or type/shape of inputs that the neural network accepts (for example, in Keras, you can use the class InputLayer), so it doesn't usually compute any function (although it's possible that your implementation of the input layer performs e.g. some kind of preprocessing), like the other layers, ...


0

We need to compute the gradients in-order to train the deep neural networks. Deep neural network consists of many layers. Weight parameters are present between the layers. Since we need to compute the gradients of loss function for each weight, we use an algorithm called backprop. It is an abbreviation for backpropagation, which is also called as error ...


1

This is a really hard question to answer, as there's no telling just how much each company spends specifically on AI. It helps that Google (or rather Alphabet Inc) has a specific subsidiary company specialising in AI (DeepMind), but even with this Google may have it's own division that works on other AI projects. You're questions are vague and vary massively ...


6

First of all, as mentioned by @Neil Slater in the comment - you need to have three splits into the train, validation and test set. One sometimes disregards the difference between validation and test set. However they serve for different purposes. Here I would like to cite https://machinelearningmastery.com/difference-test-validation-datasets/ : Validation ...


1

In case the question is if NNs can be trained without data, as pointed by others, the answer is negative - any training by definition involves the use of data in some way - supervised, semi-supervised, reward, etc. However, if the question is whether one can obtain something useful I would think about the following use cases: One can use randomly ...


0

I would like to add "The Master Algorithm" by Pedro Domingos. I would say it's more philosophical but still provides high level discussions about differences between algorithms. He also has a sense of humor which makes it a lighter read.


0

The famous book Artificial Intelligence: A Modern Approach (by Stuart Russell and Peter Norvig) covers all or most of the theoretical aspects of artificial intelligence (such as deep learning) and it also dedicates one chapter to the common philosophical topics that you mention.


2

Neural networks are trained by using pairs of example input/output vectors that they learn to associate and can generalise from. In that sense, they always need training data. For supervised learning, a neural network (NN) is trained on a dataset of example inputs and outputs (aka "a labelled dataset") that the user must provide somehow. There are ...


5

You cannot train a neural network without training data. It would be like training a football player without making him/her play/watch football or anything that resembles football: it's simply not possible. The definition of training/learning in machine learning strictly requires data. You can train a neural network in different ways (e.g. supervised or ...


Top 50 recent answers are included