Is it bad practice to run a Machine learning algorithm on an experimental dataset, check the MAE, and remove the instances that have a value of MAE above a certain value? If we run the algorithm without those instances the accuracy increases significantly of course. I know that something similar can be used when we ..
I have a simple NN: import torch import torch.nn as nn import torch.optim as optim class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.fc1 = nn.Linear(1, 5) self.fc2 = nn.Linear(5, 10) self.fc3 = nn.Linear(10, 1) def forward(self, x): x = self.fc1(x) x = torch.relu(x) x = torch.relu(self.fc2(x)) x = self.fc3(x) return x net = Model() opt = ..
I am trying to train a neural network with pyTorch, but I get the error in the title. I followed this tutorial, I just applied some small changes to meet my needs. Here’s the network: class ChordClassificationNetwork(nn.Module): def __init__(self, train_model=False): super(ChordClassificationNetwork, self).__init__() self.train_model = train_model self.flatten = nn.Flatten() self.firstConv = nn.Conv2d(3, 64, (3, 3)) self.secondConv ..
I am using this code I found on the internet. I understand the parameters of the function itself but I am having problems in the last loop. When I set the break at 20, I was thinking it will make 20 images of every image found in my directory. My directory has about 420 images ..
When I run a train.py file that is suppose to produce semantic segmentation on different images from datasets, I get the following error (QGN) [[email protected] QGN]$ python train.py Input arguments: id ade20k arch_encoder resnet50 arch_decoder QGN_dense_resnet34 weights_encoder weights_decoder fc_dim 2048 list_train ./data/train_ade20k.odgt list_val ./data/validation_ade20k.odgt root_dataset ./data/ num_gpus 1 batch_size_per_gpu 2 num_epoch 20 start_epoch 1 epoch_iters ..
educated programmers and hobbyists without a diploma! The first time I heard about the concept of machine learning was as a PhD aspirant. During that time, of course Facebook and many others have used some ML strategies like ‘face recognition’ etc. However, there was a scientific article, showing an implementation of neural network in the ..
The code was running before but after saving it doesn’t. I have SyntaxError: ‘return’ outside function issue with line 12. I did try to copy the code and paste code into IDE, and I did format it so I could see the indentation, underscores, and other details. But somehow it stopped working. import numpy as ..
I have an MLP model that achieved 90% validation accuracy without hyperparameter optimization with a dataset of 6-features and 1.4 million rows. My objective was to achieve 97% accuracy. Therefore, I tuned my MLP model using Keras-tuner. Then I trained the model again. However, I see that the tuned model doesn’t attain more than 90% ..
Say I have a 1d vector A = [1,2,3,4,5] as input. I have an output vector B = [2,4,6,8,10] which is multiple of 2 of the input vector. The 2 is a vector with all its elements 2. How can I make a network which can predict a vector containing 2’s. . For test I ..
I have a numpy classifier based on this book (free to read on the web) and on this code on github. Here is the code for my network: import numpy as np import random import pickle import matplotlib.pyplot as plt import copy def sigmoid(x): return (1/(1+np.exp(-x))) def dsigmoid(x): return sigmoid(x)*(1-sigmoid(x)) def dsigmoidmatrix(x): return np.multiply(sigmoidmatrix(x), (np.subtract(np.ones((x.shape)), ..