Questions tagged [neural-networks]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

Image-based reinforcement learning with neural networks

After seeing that "OpenAIGym" is not exactly supported on Windows and playing around with https://www.wolfram.com/language/12/neural-network-framework/train-an-...
32
votes
4answers
945 views
+100

How to make a custom NN layer in Mathematica?

Is there a way to create our own custom layers for Neural Networks in Mathematica ? I suspect it should be possible, any pointers or directions on how to go about it? I am interested in ...
0
votes
0answers
14 views

BatchNormalizationLayer instead of data prep

I've trained a neural net to match nx7x5 matrices to nx1 scalars; the n is a number of elements in a sequence. To get a good match I have to do some data prep; basically do a ...
6
votes
0answers
132 views

Manually converting TensorFlow models to Mathematica

Is Mathematica (v12, my third, semi-informed, attempt at manual conversion) ...
0
votes
0answers
22 views

NetDecoder using InverseShortTimeFourier, InverseSpectrogram, or Audio, etc., Possible?

I'm finding it impossible to create a NetDecoder to function as the inverse equivalent of, e.g., NetEncoder["AudioSTFT"], ...
1
vote
0answers
80 views

Measuring Degree Correlations of Networks

I'm trying to write a program that will measure the degree correlation of the network. The theory is here (page 8). I've written something like this up to now: ...
0
votes
1answer
79 views

Transform function {a,b} ->{x,y} ; how to?

I have a 2D list of values that I want to transform/calibrate to another 2D list. I thought of using a predict function but I couldn’t get it to output 2 values. —...
0
votes
0answers
50 views

Distance matrix inside a neural net

So what I would like to do is to create a NetGraph that takes in an $n\times 3$ (with $n$ varying in length) list of 3D coordinates as an input and creates an $n \times n$ distance matrix or an $\frac{...
3
votes
3answers
70 views

Unable to attach a new NetDecoder to a NetModel following the documentation

I am following the documentation in the page https://reference.wolfram.com/language/ref/NetModel.html. I am getting error when I try to execute the code given for attaching NetDecoder for a given ...
2
votes
1answer
87 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 ...
2
votes
0answers
58 views

How to train custom objects using YOLO in Mathematica?

I want to train few custom object using YOLO V2 architecture but not sure how to do this. I know that with the NetTake and NetReplace, this is achievable. Can someone point out me in the right ...
2
votes
0answers
58 views

Deep neural network training on large datasets

I am training a deep net on large training dataset. I read the tutorial from the following link: Training on Large Datasets. I have put each predictor-preditand tuple into a separate mx file. My ...
0
votes
1answer
52 views

Classifying numeric vector data [closed]

Neural Networks seem so complex these days. Can anyone please suggest a simple structure (i.e. code) for training numeric vector data: examples of 24 numeric inputs to produce 1 (integer) numeric ...
0
votes
0answers
12 views

Best approach to Save the BestValidationRound throughout training

I have a network that I would like to train.I would like at the end of training to be able to have the BestValidationRound, from all training Rounds. I would not want to have ...
3
votes
0answers
52 views

Net layer that replicates last element

I am trying to design a neural network layer that takes in an array of dimensions n x 100, and produces an array of dimensions ...
3
votes
0answers
21 views

Output of TransposeLayer[] is not fully specified, but why?

So I created and initialized the following NetGraph: ...
0
votes
1answer
53 views

Image matching and transformation

I hope this picture can help me to be clearer. The triangles represent some values of an image (EDITED: positions). The same for the circles, but from a different image. Some values matches, some ...
4
votes
0answers
28 views

Change the FullSummaryGraphic size for deep neural networks

I am using the "FullSummaryGraphics" of a neural network: NetInformation[model,"FullSummaryGraphic"] After having the following result: I would like to modify ...
0
votes
1answer
81 views

Using a neural net to make predictions

I want to use a neural net to give predictions, but I am not sure where to start. I do know that I don't want to use the high-level Predict function. So what I ...
4
votes
1answer
117 views

Neural net with scalar Boolean output for binary classification

How can I create and train a neural network with a scalar Boolean output for binary classification, and hopefully have it automatically compute the "ErrorRate" ...
2
votes
1answer
85 views

How to provide an RNN various type of inputs?

I'm trying to build an RNN in Mathematica. My window is only 2 but the variables are of different types: ...
3
votes
1answer
91 views

NetTrain does not update the parameters of NetSharedArray

I am attempting to use a Neural Network to solve differential equations based on a method I read in a paper. This involves constructing multiple separate NetGraph ...
3
votes
0answers
55 views

NetGraph copying by reference

I have a GAN defined like so: GAN = NetGraph[{"gen" -> generator, "dis" -> discriminator}, {"gen" -> "dis"}]; My question is if I use NetTrain on ...
2
votes
1answer
55 views

Chaining NetGraphs

I have two NetGraphs, each with 3 different input ports ("Input","Random1","Random2"), the first with 2 outputs ("Output" and "Loss") and the second with one output "Final_Out". All I want to do is "...
20
votes
0answers
350 views

Implementing Contextual Bandits

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 ...
1
vote
1answer
48 views

Output of the trained neural network for a set of inputs

Sorry if this was too trivial but I want to get the output of the neural network I trained for the specific inputs that I feed. The notation I often saw was of TrainedNet[inp] kind. But when I use ...
4
votes
1answer
97 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. <...
0
votes
0answers
73 views

Error Histogram of a Neural Network

Can you plot the error histogram of a trained network (with test, train and validation sets if possible but one would be enough)? Matlab Easily does that for you but I could not find a function that ...
7
votes
0answers
321 views

How to train a bounding box detection model?

Apparently, this still isn't possible in v12? I'd like to add a new class to one of the standard object detection architectures. Consider the YOLO v2 detector from the Neural Net Repo. ...
0
votes
0answers
24 views

Transfer learning with different input size

How to do transfer learning for the input of dimension (64x64x1)using Resnet-50, which has three-channel input (224x224x3)?
4
votes
2answers
220 views

Why doesn't NetTrain use GPU as TargetDevice?

I have a NetTrain call with the following parameters: tNet = NetTrain[inVecs -> outVecs, TargetDevice -> "GPU"]; But ...
11
votes
2answers
203 views

Custom SGD optimizer in Mathematica neural network framework?

I have a new approach to SGD optimizer, and thought to try to test it in Mathematica. It uses gradients to simultaneously maintain online parabola model for smarter choice of step size - I only need ...
2
votes
0answers
130 views

How to generate names with a GAN?

I'd like a tutorial for text generation using GANs, specifically for names. I have a list of company names and would like the network to generate novel ones. This is one of the only few examples of ...
0
votes
0answers
34 views

No progress on validation NN training set

So in short my issue is that I'am training a neural network and while the training loss reduces over time, the loss of validation set remains constant. The progress of training looks like this: I am ...
3
votes
0answers
125 views

Backpropagation for manual neural network training [duplicate]

I need to train a neural network manually. Is there a simple way to get the derivatives of all of the learned parameters in the network (with respect to the output) via backpropagation, other than ...
7
votes
1answer
169 views

NetPortGradient output port restriction

The documentation for NetPortGradient says net[<|..., NetPortGradient[oport] -> ograd|>, NetPortGradient[iport]] can ...
3
votes
1answer
87 views

Reccurent neural network

I watched the this video on YouTube and copied the code. Why it does not work in M12? I mean net[inData] and ...
5
votes
1answer
256 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....
5
votes
0answers
92 views

Gradient of neural network output with respect to input

Context: I'm studying adversarial attacks on neural networks. These attacks are grouped into targeted, where a legitimate input is changed by some imperceptible amount and the new input is miss-...
3
votes
2answers
215 views

Does Mathematica 12 support GT 730 CUDA?

I am getting the following error when I set the target device as GPU: NetTrain::trgdevegpu: TargetDevice -> GPU could not be used; a supported NVIDIA GPU was not found. If you are using an ...
5
votes
1answer
169 views

Custom Loss Layer to ignore ordering

I am trying to train a net that takes a sequence of numbers and gives a sequence of numbers. For example: ...
6
votes
0answers
73 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 ...
5
votes
0answers
59 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: ...
6
votes
0answers
142 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 ...
2
votes
0answers
96 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 ...
1
vote
0answers
52 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 ...
2
votes
1answer
103 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 ...
0
votes
0answers
49 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
38 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 ...