The accuracy in the neural network does not change
The code of a fully connected NN (I know what is better convolutional, I will do it further), which determines the numbers from the MNIST dataset. When enabled, accuracy does not change at all. What could be the mistake?
Implementing nn.Bilinear Layer
Can anyone help me understand the implementation of nn.Bilinear
As per the documentation, this function implements y = x1T * A * x2
taking x1 = (100,20)
, x2 = (100,30')
, assuming output_features = 50
. The matrix A
has dimensions of [50,20,30]
.
I am finding it difficult how these matrices are multiplied to get the output = [100,50]
cross_relation of target variables in pytorch neural network
I want to develop a neural network with 26 input features and 20 target variables. I used pytorch to construct the network. Now, I want the model to also include any possible relation between the target variables. This is how I constructed the network:
coss_relation of target variables in pytorch neural network
I want to deveope a neural netwrok with 26 input features and 20 target variables. I use pytorch to construct the network. Now, I want the model to also include any possible relation between the target variables. This is how I constructed the network:
Can scheduler affect loss and accuracy at the very start of training?
I am trying to implement a scheduler into my pytorch neural network. When I train the network, at the very start I get circa 2.5 loss with the scheduler (every scheduler I tried gives similar results) and around 1.5 loss without a scheduler.
Second order derivative is not done in pytorch
def dv(): for k in range(n): z10=make_prediction(x2,t)[0] z1=torch.tensor(z10,requires_grad=True) z1[k].backward(create_graph=True) u_x00=x2.grad[k] u_t0=t2.grad[k] u_x0=torch.tensor(u_x00,requires_grad=True) u_x0.backward() u_xx0=x2.grad[k] The derivative of the network with respect to x in the first order and the second order are equal, as if the second order does not work at all python deep-learning pytorch neural-network New contributor Nsss123 is a new contributor to […]
for categorical class RuntimeError: 0D or 1D target tensor expected, multi-target not supported
i have 28 features and target variable is categorical (0-8) i.e. 9 target variable .
data sample
X_train.shape,y_train.shape
output –((640, 28), (640, 1))