Category "neural-network"

Can I unpack an `nn.ModuleList` inside `nn.Sequential`?

I am parametrizing the number of hidden layers of a simple ANN using nn.ModuleList. I am wondering if passing this list into a nn.Sequential module as follows w

Plot the Decision Boundary of a Neural Network in PyTorch

I've been trying to plot the decision boundary of my neural network which I used for binary classification with the sigmoid function in the output layer but wit

got nan in keras tuner but it works when I train it

I trained my network several times and I already got some results. Then I found out about the Keras tuner and wanted to find the best hyperparameters with it. b

TypeError: __init__() missing 1 required positional argument: 'units' while coding an neural net

import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from keras import Sequential from tensorflow.keras.layers import Dense f

Audio resampling layer for tensorflow

It is required to resample audio signals within a custom model structure. This resampling task is not a kind of pre/post-processing operation that can be develo

How to train LSTM model with variable-length sequence input

I'm trying to train LSTM model in Keras using data of variable timestep, for example, the data looks like: <tf.RaggedTensor [[[0.0, 0.0, 0.0, 0.0, 0.0, 1.0,

Tensorflow - Value Error in model.fit - How to fix

I am trying to train a Deep Neural Network using MNIST data set. BATCH_SIZE = 100 train_data = train_data.batch(BATCH_SIZE) validation_data = validation_data.b

How to change activation layer in Pytorch pretrained module?

How to change the activation layer of a Pytorch pretrained network? Here is my code : print("All modules") for child in net.children(): if isinstance(chi

In keras/ tensorflow, Is there a way to add a preprocessing layer to the output, similar to TargetTransformRegressor in sklearn?

I want to use keras to build a neural network regression model from X_train -> Y_train. In this example, however, I need to perform a preprocessing transform

Matrix multiplication in TensorFlow model

I want to use matrix multiplication inside TF model. My model is a NN with input shape = (1,9). And I want to get a product of this vectors by themself (i.e. I

How to override gradient for the nonlinearity functions in lasagne?

I have a model, for which i need to compute the gradients of output w.r.t the model's input. But I want to apply some custom gradients for some of the nonlinear

multilayer_perceptron : ConvergenceWarning: Stochastic Optimizer: Maximum iterations reached and the optimization hasn't converged yet.Warning?

I have written a basic program to understand what's happening in MLP classifier? from sklearn.neural_network import MLPClassifier data: a dataset of body met

robot NAO object detection from scratsh

is it possible to create my own object detection script with YOLO or create a Neuron Network to implement it in the NAO robot( iknow that there is a box of det

robot NAO object detection from scratsh

is it possible to create my own object detection script with YOLO or create a Neuron Network to implement it in the NAO robot( iknow that there is a box of det

How to create a copy of nn.Sequential in torch?

I am trying to create a copy of a nn.Sequential network. For example, the following is the easiest way to do the same- net = nn.Sequential( nn.Conv2d(16

Why doesn't mean square error work in case of angular data?

Suppose, the following is a dataset for solving a regression problem: H -9.118 5.488 5.166 4.852 5.164 4.943 8.103 -9.152 7.470 6.452 6.069 6

Is there any documentation about default weight initializer in Keras? [duplicate]

I just read about the Keras weight initializers in here. In the documentation, only different initializers has been introduced. Such as: mode

How to Setup Adaptive Learning Rate in Keras

Below is my code: model = Sequential([ Dense(32, input_shape=(32,), activation = 'relu'), Dense(100, activation='relu'), Dense(65, input_shape=(65

Variational AutoEncoder - TypeError

I am trying to implement a VAE for MNIST using convolutional layers using TensorFlow-2.6 and Python-3.9. The code I have is: # Specify latent space dimensions-

Derivates from a class instance in TF1

I am using the Physics Informed Neural Networks (PINNs) methodology to solve non-linear PDEs in high dimension. Specifically, I am using this class https://git