Skip to main content

All Questions

Filter by
Sorted by
Tagged with
73 votes
6 answers
5k views

Q&A Mathematica v.11 Neural Networks: A comprehensive look at Layers, Net Functions, and pioneering into this [[experimental]] code

Motivation As Mathematica v.11 was released earlier this month with a host of new [[experimental]] functions and a limited number of examples on curated data that ...
SumNeuron's user avatar
  • 5,442
48 votes
2 answers
9k views

Object detection and localization using neural network

Four important computer vision tasks are classification, localization, object detection and instance segmentation (image taken from cs224d course): These four tasks are all built on top of the deep ...
xslittlegrass's user avatar
20 votes
4 answers
1k views

How to use Mathematica to train a network Using out of core classification?

I see there is doc about how to train a network Using out of core image classification and this question.But the object is only image. I want to use a binary file as data(Sequence to Sequence case),...
partida's user avatar
  • 6,866
20 votes
2 answers
1k views

Training Neural Networks on Cloud GPUs (Wolfram Cloud / AWS / Paperspace /etc)

I have spent a lot of time lately training neural networks. However, my poor laptop has only an AMD GPU, so I am stuck training these networks on the CPU. That means I get to train networks over ...
Carl Lange's user avatar
  • 13.2k
9 votes
3 answers
936 views

Example of NetChain running in MXNet cause Error

Cross post here Problem remains in Mathematica 11.2 First defining the net ...
partida's user avatar
  • 6,866
7 votes
3 answers
888 views

how to take ImageFeatures?

I want to know how to transform images to feature vector. There is a function FeatureExtractor.And it has some methods. ...
erow's user avatar
  • 449
48 votes
5 answers
4k views

Generative Adversarial Network

Generative adversarial networks (GAN) is regarded as one of "the most interesting idea in the last ten years in machine learning" by Yann LeCun. It can be used to generate photo-realistic images that ...
xslittlegrass's user avatar
12 votes
1 answer
1k views

Configuring GPU for NetTrain

I currently have access to a system with two GPUs: GeForce GTX 1080 and Tesla K40c I would like to use this machine for training neural networks in Mathematica. When using the option ...
dan7geo's user avatar
  • 1,410
11 votes
1 answer
406 views

How to view ClassifierFunction's preprocessed data?

Classify apparently preprocesses your input data, for example (same example from Classify reference page, but using ...
nqduy's user avatar
  • 360
9 votes
1 answer
3k views

Fashion segmentation with a neural net?

I would like to train a network that can parse clothing: Does anyone know of a fashion segmentation network with or without pre-trained weights available that I can use in Mathematica? Update: I ...
M.R.'s user avatar
  • 31.8k
8 votes
1 answer
758 views

Which GPUs does NetTrain work with?

NetTrain's option TargetDevice -> "GPU" works for old macbooks that have GEForce GT 750m cards (like mine), but what about other nvidia cards? Does it (or will ...
user5601's user avatar
  • 3,820
8 votes
2 answers
853 views

Training data generator?

Python has generators which save memory, is there a technique for generating in memory examples for your training set "on the fly". For example purposes, I constructed here a regressor for blur: <...
user5601's user avatar
  • 3,820
91 votes
1 answer
14k views

Crack CAPTCHA using deep learning

Deep convolutional neural networks are very good at computer vision related tasks. Optical Character Recognition (OCR) is one important branch of computer vision. In fact, the convolution neural ...
xslittlegrass's user avatar
48 votes
3 answers
3k views

Generalized Backpropagation for Neural Networks (e.g. DeepDream)

Is there currently any way to abuse NetTrain to maximize an arbitrary cost/utility -function in some hidden layer and/or even modify the input to increase neuron ...
Sascha's user avatar
  • 8,529
36 votes
1 answer
3k views

RNN in Mathematica?

Recurrent neural network is an important part of machine learning and its improved version: LSTM network is widely applied, but Mathematica seemingly is in lack of these two features and in my opinion,...
Wjx's user avatar
  • 9,660
28 votes
1 answer
2k views

How to export an MXNet?

I was hoping there was some way to generate the .params and .json file needed to define an MXNet model, from a network trained using NetTrain[] in Mathematica. I ...
user5601's user avatar
  • 3,820
17 votes
1 answer
1k views

How to implement a stateful RNN?

If the model is stateless, the cell states are reset at each example. With the stateful model, all the states are propagated to the next example. Stateful RNNs can learn the long sequences. For ...
Alexey Golyshev's user avatar
16 votes
1 answer
2k views

How to visualize attention?

In the articles about sequence attention we can see images like this: Here we see that while translating from French to English, the network attends sequentially to each input state, but sometimes it ...
Alexey Golyshev's user avatar
15 votes
1 answer
509 views

Using PredictorMeasurements with a neural net?

PredictorMeasurements doesn't work with NetGraph, here's an example: ...
user5601's user avatar
  • 3,820
13 votes
2 answers
2k views

How to change NeuralNetwork options?

How can I manipulate the architecture and problems of a NeuralNetwork in Predict or Classify? For example, running the following ...
mdeceglie's user avatar
  • 968
12 votes
3 answers
775 views

How to make Advanced Activations Layers in Mathematica?

I want to try Advanced Activations Layers in Mathematica,but not found. So I try to use ElementwiseLayer to implement it. ...
partida's user avatar
  • 6,866
7 votes
1 answer
325 views

NetPortGradient output port restriction

The documentation for NetPortGradient says net[<|..., NetPortGradient[oport] -> ograd|>, NetPortGradient[iport]] can ...
CarbonFlambe's user avatar
  • 1,244
6 votes
1 answer
1k views

Is it possible to fix the weight of a certain layer during neural network training?

As suggested by the title, is it possible to fix some part of the neural network while training? Since Mathematica provides a way to extract part of a neural network and combine it with some layers ...
Tom's user avatar
  • 269
58 votes
5 answers
8k views

Mathematica command that allows it to read my intentions

In version 2.0 of Mathematica there was a command, ReadProgrammerIntentions[ ] which allowed it rapidly compose code that could solve problems simple to complex, ...
40 votes
2 answers
2k views

How can I export my learned ClassiferFunction[] and PredictorFunction[]s?

Mathematica 10 provides beautiful high-level machine learning functionality. Sadly, the learned functions once created are rather opaque objects. I need to use them in other projects, so here is my ...
user5601's user avatar
  • 3,820
35 votes
4 answers
1k views

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 ...
Andy Stow Away's user avatar
23 votes
1 answer
943 views

How to ImageRestyle high-res images?

I’m running v12 now and ImageRestyle[] crashes for me on an image of size 1600 x 1200 pixels. All the examples in the documentation use images around 500 x 500 or ...
M.R.'s user avatar
  • 31.8k
22 votes
5 answers
4k views

Recurrent neural network in 11.1 explicit examples?

I heard that RNN was implemented in Mathematica as of 11.1. Trying to search online, I find some general information about neural networks in Mathematica, or a list of related functions. My trouble is ...
Kagaratsch's user avatar
  • 12.1k
18 votes
2 answers
1k views

Diffusion probabilistic model in deep generative modeling

Diffusion Models (http://proceedings.mlr.press/v37/sohl-dickstein15.html and https://arxiv.org/abs/2006.11239) are generative models gaining popularity in the community of deep generative modeling, ...
Baoxiang Pan's user avatar
14 votes
1 answer
918 views

Neural machine translation model using deep learning

In Mathematica version 11.1, SequenceAttentionLayer is introduced to model attentions in the recurrent neural network. It has been shown that attention mechanism ...
xslittlegrass's user avatar
13 votes
2 answers
524 views

Simple example of NetGraph running in MXNet?

There is an great example of exporting a NetGraph (that was trained in Mathematica) into the MXNet's format. However, I think there's a bug or something is wrong with the answer, because once ...
user5601's user avatar
  • 3,820
13 votes
2 answers
790 views

How to implement a triplet network with NetSharedArray?

In v11.3, NetSharedArray[] and NetInsertSharedArray[] give us a mechanism of sharing weights and biases across neural networks, ...
M.R.'s user avatar
  • 31.8k
13 votes
2 answers
3k views

How to train a convolutional neural net on images?

The functions Predict[] and Classify[] both have the option Method -> "NeuralNetwork", ...
M.R.'s user avatar
  • 31.8k
13 votes
1 answer
9k views

How can image segmentation from UNET be improved?

EDIT 2: code can be found @ https://github.com/alihashmiii/UNet-Segmentation-Wolfram EDIT 1: applying Binarize to the masks after resizing helps to ensure the data for mask is binary I have made an ...
Ali Hashmi's user avatar
  • 9,060
11 votes
0 answers
235 views

Tutorial example NetTrain fails miserably with a GPU

I have been experimenting with GPU NetTrain on AWS now when Mma 12.2 supports remote batch jobs (I don't have an Nvidia GPU to try these things out otherwise). In ...
kirma's user avatar
  • 19.1k
11 votes
1 answer
870 views

How to use an external GPU to train neural networks in Mathematica?

Taking steps in the uncharted territories of eGPUs, I have installed an NVIDIA GeForce Titan Xp GPU on an eGPU enclosure (Mantiz MZ-02) and have connected it to my laptop (HP Spectre x360 - 15-bl075nr ...
Miladiouss's user avatar
  • 1,883
11 votes
3 answers
994 views

Using Mathematica wlnet model in C++

Suppose if there is a trained net: SeedRandom[1234]; net = NetInitialize@NetChain[{5, 3}, "Input" -> 2]; It can predict image in mma: ...
partida's user avatar
  • 6,866
10 votes
1 answer
269 views

Can one use NetTrain with two Nvidia GPUs?

I am thinking of buying another GPU to accelerate my training. Will I be able to call NetTrain with both GPUs ("TargetDevice"-> {"GPU", All})? Or would it be ...
MaxJ's user avatar
  • 1,535
10 votes
1 answer
480 views

Can we implement a Neural Network interactively?

Implementing a Neural Network manually need some code and need to make some connections between these components. Can we implementing a Neural Network interactively?If I want to make a net like ...
partida's user avatar
  • 6,866
10 votes
0 answers
786 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. ...
M.R.'s user avatar
  • 31.8k
9 votes
1 answer
152 views

Can Mathematica Neural Net make use of the REC file format for images like MXNet?

When using large set of images for training neural networks (>10000, size 250 x 250 each) the time to read the images is quite long. My first approach was to use the DataSet functionality of ...
user2980583's user avatar
9 votes
2 answers
400 views

Options for ValidationSet accuracy from NetTrain?

With NetTrain[] if you use the option ValidationSet->Scale[.1] it will run a validation test on 10% of the training data ...
M.R.'s user avatar
  • 31.8k
8 votes
1 answer
5k views

How to train Sequence-to-sequence autoencoder using LSTM?

According Keras blog,I find the Seq2Seq auto-encoder. But it didn't give any example only code. To build a LSTM-based autoencoder, first use a LSTM encoder to turn your input sequences into a ...
partida's user avatar
  • 6,866
8 votes
1 answer
739 views

NetTrain automatic settings

I'm trying to compare Mathematica's NetTrain with other algorithms, and I used Automatic settings as they were working quite ...
Vsevolod A.'s user avatar
8 votes
0 answers
433 views

Use of new machine learning capability for search problems (reinforcement learning)

I work with search algorithms, often of an adversarial nature, and want to understand how to apply Mathematica's machine learning capabilities, especially those new in version 11, to this type of ...
Tyler Durden's user avatar
  • 4,102
8 votes
1 answer
509 views

Neural net example not working

Bug introduced in 11.0.0 and fixed via paclet update The Wolfram Mathematica site provides this example. I have copied and pasted into a notebook. The resource is reached and correctly sampled. ...
ubpdqn's user avatar
  • 65k
7 votes
1 answer
195 views

Bug in EmbeddingLayer?

...
Alexey Golyshev's user avatar
6 votes
1 answer
221 views

Is it possible to convert the result of NetTrain to a PredictorFunction?

I would like to use PredictorMeasurements on the result of NetTrain, but it says it expects a ...
Marco Correia's user avatar
6 votes
0 answers
186 views

How can I prevent errors with ReplicateLayer[]?

I am trying to build a NetGraph[] that takes input of the form {{0.6},{0.6},...,{0.8},{0.8}} and multiplies the last sequence ...
Jmeeks29ig's user avatar
  • 1,447
5 votes
0 answers
145 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 ...
dbm's user avatar
  • 1,249