Questions tagged [neural-networks]

Questions involving defining, training, executing, importing and exporting neural networks.

Filter by
Sorted by
Tagged with
3
votes
0answers
31 views

How can one train a Neural Network in Mathematica such as to recognise and count all occurrences of a certain custom category in an image?

I'm trying to use Mathematica for the following task: (1) Get an aereal view of a certain area in Mongolia (2) Count the number of plots that contain houses, and the number of plots that contain ...
2
votes
0answers
25 views

Error during training neural network: input is not an integer between 1 and 100 although it is

I imported my data from Matlab in matrix form and tried to use it in a neural network as given below but I get the error that says the input is not an integer between 1 and 100 although it is. <...
4
votes
0answers
28 views

Possible NetTrain[] memory leak when training in GPU

I've just moved to Mathematica 12.0 (from 11.3) and sometimes NetTrain[] will fail with the following error: ...
3
votes
1answer
105 views

How do I create & train a neural net to predict a stock closing price at T+5min using OHLC and other data?

I'm trying to create a neural network and train it to test predictability of short term stock price movements. I've collated a 1-min open, high, low, closing and volume dataset for a particular stock....
2
votes
0answers
76 views

Hessian of a loss function for a neural netwrok

Is a way to calculate the Hessian of the loss function in Mathematica. It's easy to define a loss function for neural nets but I couldn't figure out how to calculate the Hessian(more precisely I ...
0
votes
0answers
27 views

Loss function for an unsupervised neural network

I am trying to use a neural network approach to fit a model based on two sets of data: the "before" set and the "after" set. The "after" set is the subset of "before" examples that have survived to a ...
0
votes
0answers
40 views

Can we train a same network two times with Mathematica?

I have a simple question about Mathematica 11.3. Is is possible to train a model of neural network with NetTrain in several steps like with Keras? Perhaps do I have to (1) create my model, (2) train ...
0
votes
0answers
33 views

Splitting large matrix in neural network

I'm trying to make a neural network that takes a 16x100x100 matrix and splits it into each 100x100 part, puts each through a dense layer, and then puts them them together once again to form a 16x10x10 ...
7
votes
1answer
119 views

NetTrain Freezes Computer

I have a neural network I am trying to train: ...
6
votes
0answers
127 views

Export ImageCases to Python?

I’d like a tutorial on how to export a bounding box detector network to mxnet, (for bonus points: convert to Tensorflow), and then get it running correctly in python! Some related questions exist for ...
0
votes
0answers
29 views

Repeatedly download a NetModel

NetModel["Wolfram AudioIdentify V1 Trained on AudioSet Data"] I can download the NetModel, but once I quit the kernel, next time I should download the NetModel ...
0
votes
1answer
49 views

On Formatting Input Data When Training Neural Network in Mathematica

I'm trying to train the following structure of neural networknet with customized loss functionlossnet each code and structure ...
8
votes
0answers
85 views

How to implement graph neural networks in Mathematica?

Graph neural networks are useful for prediction tasks like predicting walks. In python I use DeepGraph typically, but I'm wondering what can be done in the new Version 12. Here's a nice introduction ...
2
votes
1answer
84 views

Plotting large scale image embeddings

I'm looking for help making publication-quality graphics for visualizing 2D embeddings of image datasets, so that they look like this: These two-dimensional embeddings of thumbnails (sometimes with ...
5
votes
2answers
195 views

Finding the symbolic expression for the loss function of a basic feed forward network

Is there any basic code available to get the symbolic expression of the cross entropy (and/or mean squared error) loss function for feed-forward neural network with one or more hidden layers in ...
3
votes
1answer
54 views

One-hot vectors encoding with NetEncoder

I have a text and vocabulary (text has two "the" entries): ...
0
votes
0answers
37 views

Dataset format for Neural Networks

I don't think I'm understanding the association form for data to neural networks. I wrote the following network which takes arrays of size (2, 100) as input, and outputs a length 100 vector. I thought ...
5
votes
1answer
94 views

Built-in way to draw LinearLayer graph

Newer versions of Mathematica come with built-in tooling for training and simulating neural networks. For a simple LinearLayer, e.g. ...
2
votes
1answer
71 views

UtilityFunction for actual and predicted values (machine learning)

In machine learning, the utility function for a classifier assigns the utility value to an actual value v(act) and a predicted value v(pred), typically e.g. in form of ...
1
vote
0answers
48 views

Improving the accuracy of the bounding box detection of TextRecognize

My problem concerns the text position detection in a scan. My goal is to find the bounding boxes of the text. ...
0
votes
1answer
52 views

Inferred inconsistent value for dimensions “loss”

I'm trying to write my first neural network in Mathematica: a simple autoencoder. The network takes as input an array of size (2, 100) and reconstructs a vector of length 100 (see below). I'm trying ...
6
votes
1answer
61 views

Neural network layer for vector normalization

We have a neural network that returns a vector $v$ with length $n$. However, these results $v_i$ must be normalized to unity so that their sum $\sum_{i=1} ^{n} v_i=1$. It must be done inside the ...
4
votes
0answers
64 views

Improving NetChain for Physical Data

I am trying to improve my NetChain to better predict physical data from the industrial standard for water/steam published by the IAPWS. Basically, this industrial ...
0
votes
0answers
27 views

Unable to replicate Predict/NeuralNetwork example from Help Pages

I am trying to replicate an example right out of the help manual (ref/method/NeuralNetwork). This example compares the convolutional NN versus a fully-connected NN....
-1
votes
1answer
85 views

Neural network to classify gender from username

Does anyone know of a trained net that can classify gender from username from any website? It would be nice if there is something in Wolfram Neural Net Repository or something that can be easily ...
0
votes
1answer
42 views

AttentionLayer what is it and why would it be used

Could anyone elaborate on the new Neural Network layer in Mathematica Verison 12: https://reference.wolfram.com/language/ref/AttentionLayer.html AttentionLayer The documentation is rather sparse on ...
3
votes
1answer
82 views

Scalar vs vector of size 1 in neural networks

I've been playing with Mathematica's neural network functions, and I keep getting stuck on the same annoying problem. Often Mathematica declares that the output of my neural network is a vector of ...
13
votes
0answers
151 views

Implementing Contextual Bandits in version 12

The multi-armed bandit problem (MAB) is a classic in Reinforcement learning. Now that mathematica version 12 finally has support for Reinforcement learning: Here's a nice "mnist example" for training ...
8
votes
1answer
185 views

Is Mathematica's implementation of convolutional neural networks really inefficient?

I'm surprised how slow ConvolutionLayer works with TargetDevice->"CPU". For instance this code: ...
1
vote
1answer
73 views

Random sampling of a discrete distribution in NetGraph

Within a NetGraph I would like to use the output of a softmax layer, interpreted as a probability distribution, to sample a "next token". Since this is done inside an RNN structure, I cannot do this ...
5
votes
0answers
125 views

NetTrain on a UNet with a NVidia Quadro P5200 GPU

I am trying to train a UNet on my laptop (Lenovo P72) and I obtain the following error when I use NetTrain on it: CompiledFunction::cfta: Argument {Mean[LibraryFunctionError[LIBRARY_FUNCTION_ERROR,...
5
votes
0answers
67 views

Can I extract symbolic expression of neural network loss function?

Once we create a neural network with NetChain in Mathematica, can we extract the loss function in the symbolic form for Mathematica to play with symbolic manipulations using Mathematica's built-in ...
3
votes
1answer
74 views

How do I create my own activation function in NetChain in Mathematica?

I want to have my own activation function, say a quadratic function, instead of Tanh, or Sigmoid etc. in Mathematica. How do I insert it in NetChain? e.g., how will the below code look for a new ...
0
votes
0answers
54 views

TargetDevice->“GPU” takes no effect in prediction of Classify and ClassifierMeasurements?

I can train the model with GPU via method->"NeuralNetwork" in Classify. I'm on Mathematica 12.0 and the problem also happens in 11.3. Is this a bug since 11.1 to 12.0? In training, GPU is faster ...
10
votes
1answer
344 views

Bug in Mathematica 12 neural networks?

I recently downloaded Mathematica 12, and I'm experiencing a curious failure in neural networks that had earlier worked. This failure I will demonstrate with the NN in "Classifying Data with Neural ...
4
votes
0answers
70 views

How to extend ImageCases?

I was very excited to see ImageCases being documented in version 12. But I immediately desired a mechanism for adding more entities to ...
1
vote
0answers
39 views

Use of Normal with layers and plots

In documentation of ConstantPlusLayer we find ...
6
votes
1answer
74 views

Compute neural network loss over sliding windows?

I am trying to use the structural similarity index, which is defined in terms of a computation over sliding windows, as a neural network loss function. Obviously one can get a sliding mean using a <...
6
votes
1answer
120 views

Bug in EmbeddingLayer?

...
6
votes
1answer
119 views

How to load trained RNN in MXNet?

No problems with CNN ...
0
votes
0answers
47 views

Compatibility Nvidia and Mathematica 11.3 [duplicate]

I am wondering about the compatibility between Mathematica 11.3 (Windows or Linux) and the Nvidia Quadro P5200 provided in the ThinkPad P72. Can I be sure that Mathematica will be able to detect and ...
2
votes
1answer
64 views

How can I have two neural network layers act as the input to one layer?

When using NetGraph[], I am try to specify the connections between 3 layers like so: NetGraph[{...some layers...},{...{2,3}->4}] But I receive the following ...
2
votes
1answer
54 views

Where to find information about models, data and labels used by Image/AudioIdentify?

I am thinking about using Mathematica 12's ImageIdentify and AudioIdentify functions for an interdisciplinary research project. The social science part of it requires to describe a little bit the ...
1
vote
0answers
18 views

Is there an inverse type function to SequenceLastLayer[]?

I am working on a text based autoencoder, and was happy to see I can feed a variable length text sequence into my network and use SequenceLastLayer[] after a GatedRecurrentLayer[] to only get the ...
1
vote
0answers
61 views

Is Wolfram Cloud going to support GPU training? [duplicate]

Is Wolfram Cloud going to support GPU training? Is there any other possibility for training a neural net (in WL) on a cloud like AWS, Floydhub, or so? I think this concerns lots of people.
2
votes
1answer
79 views

3D Deconvolutional Layer

I noticed that one of the mxnet APIs (Gluon) includes a 3D Deconvolutional Layer. However, mathematica currently only allows up to 2D deconvolutional layers (see here). Can one somehow implement a 3D ...
1
vote
0answers
61 views

Neural Network stick in an unlearned state

Background: I want to apply a net to mapping from xyY color space to Munsell. The mapping in freely downloadable as a 5000+ entries table. I transformed the table data so that the Munsell Hue is given ...
0
votes
0answers
65 views

Learning weights during training

Let's assume I have a net so the loss function is composed from 3 components: $C_1, C_2, C_3$, and each component is multiply by its weight $(w1, w2, w3)$. The weights should be a function of $\beta$,...
4
votes
0answers
85 views

Visualizing and Understanding CNN with Mathematica

The famous 2013 paper from Zeiler and Fergus "Visualizing and Understanding Convolutional Networks" proposes a method to understand the behavior of CNN using one (or more) DeConv networks coupled with ...
3
votes
1answer
88 views

NetPortGradient returns “floating-point overflow” for this simple network

Consider this simple network that computes the following function: $$ \left\{ \begin{matrix} xy & \mbox{if} \;x,y>0 \\ 0 & \mbox{otherwise} \end{matrix} \right.$$ The net looks like: <...