Skip to main content

Posts

Showing posts from May, 2021

Stretch the dynamic range of the given 8-bit grayscale image using MATL...

How to use the trained network to predict future values?

  Hi! I have created neural network using nnstart: NAR; d = 10. After training I saved network in workspase (name: net). Now can I use this trained network to predict future 10 values? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. If the new data immediately follows the data used to design and test the net, the following syntax should have been used   [ net tr Ys Es Xsf Asf ] = train(net,Xs,Ts,Xi,Ai); Xinew = Xsf; Ainew = Asf; Ysnew = net(Xsnew,Xinew,Ainew); Otherwise Xinew = Xnew(:,1:d); Xsnew = Xnew(:,d+1:end) but Ainew is not known. SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-use-the-trained-network-to-predict-future-values-.php

Labeling images using own trained classifier

Hi, I have created a classifier using  CNN  (vgg16) for the feature extraction and KNN to classify using a dataset made of 1000 images with accuracy of 96% for train and 94% for test. The question is: How can I use my classifier to label one given image? Say I have one image on an apple and I want my classifier to recognize the apple, how can I know the corresponding label of the image (in this case apple)?   What kind of function should I use? predict()? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. try like this:   newImage = imread(fullfile(rootFolder, 'airplanes', 'image_0690.jpg')); % Create augmentedImageDatastore to automatically resize the image when %

Understanding the positive and negative overlap range

  Hi all and thank you for responding to my questions in advance!   I am trying to obtain a simple understanding of the negative and postive ranges.   I read the  documentation  in matalb for the understanding but i still don't get it and the explanation there is still complex!   % Adjust NegativeOverlapRange and PositiveOverlapRange to ensure % that training samples tightly overlap with ground truth 'PositiveOverlapRange' A two-element vector that specifies a range of % bounding box overlap ratios between 0 and 1. % Region proposals that overlap with ground truth % bounding boxes within the specified range are used % as positive training samples. % Default: [0.5 1] % 'NegativeOverlapRange' A two-element vector that specifies a range of % bounding box overlap ratios between 0 and 1. % Region proposals that

Converting Numeric Matrix to Cell Array nesting columns into line (LSTM training input data)

  Please, how can I convert a Numeric Matrix (1400 lines/steps x 30 columns/features) to   Cell Array   (1400x1) Nx1 as required for LSTM training?   In this case, the 30 columns by line must be nested into the one cell array each line. In outer view, cell array will be (1400x1), but when click on cell it will open as (1x30) containing the 30 features columns in one line. Simplified example: From (5x4) matrix A  (lines: timesteps/observations, columns: input features data) 1 2 3 4 2 3 4 5 3 4 5 6 4 5 6 7 5 6 7 8 To (5x1) cell array C  (Nx1 as requested by LSTM, N = steps) nesting features columns into the cell: {1x4} => (1 2 3 4) inside line cell (1x4) {1x4} => (2 3 4 5) inside line cell (1x4) {1x4} => (3 4 5 6) inside line cell (1x4) {1x4} => (4 5 6 7) inside line cell (1x4) {1x4} => (5 6 7 8) inside line cell (1x4)   I can build it manually from an empty cell array by entering in each line cell and pasting data (30 columns) into them, but my data has 1400 lines.   The

change 'classWeights' in unetLayers

  Hello,   im using Unet to perform semantic segmentation (I want to segment liver metastasis). I want to weight 'more' the pixels of the metastasis respect to the background but I can't manage to do it...   Code for creating unet architecture:   lgraph = unetLayers(imageSize, numClasses, 'EncoderDepth', 4);   How can I change the ' classWeights ' in lgraph.Layers(end).pixelClassificationLayer in order to do this??   If, for example, I do this:   lgraph.Layers(end).pixelClassificationLayer.classWeights = [2, 0.5];   I receive an error telling me that i have first to put the 'labels' to the 'classes' options in  lgraph.Layers(end) , but if i do this:   lgraph.Layers(end) = {'metastasis', 'background'};   I receive an error telling that that layer is in 'read only' mode.... ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branche

Importing pre-trained recurrent network to reinforcement learning agent

  Hello,   Are pre-trained recurrent networks re-initialized when used in agents for reinforment learning? If so, how can it be avoided?   I am importing a LSTM network trained using supervised training as the actor for a PPO agent. When simulating without training the reward is fine, however If the agent is trained the reward falls as if no pre-trained network was used. I would expect the reward to be similar or higher after training so presumably the network is being re-initialized, is there a way around it?   Thanks   % Load actor load(netDir); actorNetwork = net.Layers; actorOpts = rlRepresentationOptions('LearnRate',learnRate); actor = rlStochasticActorRepresentation(actorNetwork,obsInfo,actInfo,'Observation',{'input'},actorOpts); % Create critic criticNetwork = [sequenceInputLayer(numObs,"Name","input") lstmLayer(numObs) softplusLayer() fullyConnectedLayer(1)]; criticOpts

Semantic segmentation using numeric array training input

  I have a series of P images, each MxNxC (in other words C channels) organized as a 4D numeric array X where size(X) is [M,N,C,P]. I have a corresponding series of P label maps organized as a 3D numeric array Y where size(Y) is [M,N,P].   Question:  How do I convert this input to a form that can be fed to t rainNetwork()  in a semantic image segmentation application?   I know that  trainNetwork  has an input syntax,   trainedNet = trainNetwork(X,Y,layers,options) but the  documentation  does not discuss the format of Y for semantic segmentation problems. ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. In case you have images with their ground truth image files, you can create  

Input and output size for deep learning regression

  I have the following input and target matrix   Input: 110 samples of 273x262   Target: 110 samples of 273x262   I have to work on  deep learning  regression problem with a simple layers as shown below   Layer: [imageInputLayer() convolution2dLayer(5,16,'Padding','same') batchNormalizationLayer reluLayer fullyConnectedLayer() regressionLayer] What is the matrix size I have to use for the inputlayer and fullyconnectedlayer? I am thinking of 4D matrix of size [273, 262, 1, 110] for inputlayer and a 2D matrix of size [273*263, 110] for output layer. Is this correct? Will this exceed the matrix array size preference? Any other suggestions. ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with

How to quickly find the layer by its name in deep learning?

  In the   deep learning toolbox , I cannot easily manipulate a specific layer. For example, I know the name of a layer. How can I quickly find it in the layer array?     layers = [convolution2dLayer(3,3,'name','aa'); reluLayer('name','bb'); convolution2dLayer(3,3,'name','cc')] For example, if I want to find a convolutional layer named "cc", can I only find one by one in a for loop? When there are many layers(There are dozens of layers), this method is very inefficient!     for i = 1:length(layers) if strcmp(layers(i).Name,'cc') myfindLayer = layers(i); break; end end If only myfindLayer = layers ('cc') can be operated like this! I hope the official will consider such a method, easy to operate! ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil w

How to replicate the example "Transfer Learning Using AlexNet" with GoogleNet?

  I tried to replicate the example "   Transfer Learning Using AlexNet  " with GoogleNet, but i don't understand how to modify the last 3 layers in order to retrain the pretrained network. Maybe, has someone modify properly this example to work with googlenet? I also found this   link  but doesn't exist now. (i'm working with Matlab 2018b) ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. You can use this example:   Train Deep Learning Network to Classify New Images The same code actually works with all the pretrained networks - just change the network that you load at the beginning of the example.