Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

Why TensorDataset devide the data to minibatches? For example, when putting in it 2D array, instead of yielding 2D tensors as batches, it sets the required batches to be minibatches, and its actual &...
J. Doe's user avatar
  • 305
1 vote
0 answers
481 views

I'm training my model with accelerate package which uses deepspeed internally. But I can't understand gradient_accumulation_steps param in its configuration. In my knowledge, ...
Yaoming Xuan's user avatar
0 votes
1 answer
45 views

I am unable to achieve good results unless I choose a batch size of 1. By good, I mean error decreases significantly through the epochs. When I do a full batch of 30 the results are poor, error ...
debo's user avatar
  • 380
0 votes
1 answer
333 views

As I understood, the idea of mini batch size is equivalent with fitting the model to only a portion of all training data at each step (one epoch consists of many steps, depending on the batch size) to ...
tamnva's user avatar
  • 63
0 votes
1 answer
871 views

I was wondering what is a good drop in replacement for from sklearn.cluster import KMeans. Others online have suggested using cuML from Nvidia's RAPIDS package, but this wasn't able to compile or ...
nini2352's user avatar
0 votes
0 answers
92 views

I have a sparse 2D matrix saved on a disk (.npz extension) that I've created in preprocessing step with scipy.sparse.csr_matrix. It is a long sequence of piano-roll (a numerical form of MIDI ...
Mateusz Dorobek's user avatar
0 votes
0 answers
95 views

I’m trying mini-batch gradient descent on the popular iris dataset, but somehow I don’t manage to get the accuracy of the model above 75-80%. Also, I’m not certain if I’m calculating the loss as well ...
rndnewbiee22's user avatar
-2 votes
1 answer
2k views

I am training a neural network. For training I get 80% of my data and divide it to a number of mini-batches. I train on each mini batch, then update parameters, until all data is visited. I repeat the ...
user25004's user avatar
  • 2,098
0 votes
1 answer
402 views

I have input and target data represented as MatrixXd (N x M) and VectorXd (N). The goal is to create mini-batches of size K consisting of a subset of input and target data shuffled in the same way. ...
Dmytro Shkarupa's user avatar
0 votes
0 answers
566 views

I am training a convolutional neural network on images (with size 299, 299, 3). The images can have labels: 0, 1 or 2 (multiclass classification), and the 3 classes are very unbalanced. To improve the ...
mad_'s user avatar
  • 11
1 vote
1 answer
1k views

Read through a lot of articles and now I am in my braindrain end, and need a fresh perspective on the concept of mini batch. I am new to machine learning and would appreciate any advice on whether my ...
axia_so2's user avatar
0 votes
1 answer
64 views

How can I increase the number of mini-batch using the Standard Updater class in Chainer substantially? In case of PyTorch, I can increase the number of mini-batch substantially. Execute loss.backward(...
takeshi0212's user avatar
3 votes
2 answers
2k views

I am new to pytorch. May I ask what is the difference between adding 'loss.item()' or not? The following 2 parts of code: for epoch in range(epochs): trainingloss =0 for i in range(0,X.size()[...
G-09's user avatar
  • 449
-1 votes
1 answer
3k views

When training my model on the adult income data set and using minibatches training is very slow regardless if I use PyTorch's DataLoader or a basic implementation for minibatch training. Is there a ...
joni's user avatar
  • 75
0 votes
1 answer
1k views

In tensorflow, if we provide validation_data in .fit(), we get validation loss. But there is only one validation loss even if the validation dataset has many mini-batches. So I was wondering how ...
Sara's user avatar
  • 245
0 votes
1 answer
1k views

My model training involves encoding multiple variants of a same image then summing the produced representation over all variants for the image. The data loader produces tensor batches of the shape: [...
hamza keurti's user avatar
1 vote
2 answers
1k views

I am able to get pretty good results from batch gradient descent(batch size 37000) but when I try out mini-batch gradient descent, I get very poor results (even with adam and dropout). In batch gd, I'...
Lelouche Lamperouge's user avatar
1 vote
0 answers
24 views

Suppose a multivariate time series prediction problem for the following data rows = 2000 cols = 6 data = np.arange(int(rows*cols)).reshape(-1,rows).transpose() print(data[0:20]) print('\n {} \n'....
Ather Cheema's user avatar
1 vote
0 answers
1k views

I came across this code online and I was wondering if I interpreted it correctly. Below is a part of a gradient descent process. full code available through the link https://jovian.ml/aakashns/03-...
anyang_peng's user avatar
1 vote
1 answer
653 views

New to neural network and Pytorch. I have 300 replay memories in each mini batch. I've seen people calculate one loss for the 300 replay memories, but it doesn't really make sense to me. The 300 ...
Andy Dong's user avatar
0 votes
1 answer
479 views

From here I understand what shuffle, batch and repeat do. I'm working on Medical image data where each mini-batch has slices from one patient record. I'm looking for a way to shuffle within the ...
Ravi Theja's user avatar
7 votes
1 answer
3k views

Problem Statement I’m training a many-to-many LSTM in keras with tensorflow backend (tf version 1.13.1) on tagged text sequences to predict the tag of each element in the sequence using pretrained ...
Des Grieux's user avatar
11 votes
2 answers
16k views

I'm taking the fast-ai course, and in "Lesson 2 - SGD" it says: Mini-batch: a random bunch of points that you use to update your weights And it also says that gradient descent uses mini-...
Luis Anaya's user avatar
1 vote
0 answers
599 views

I want to implement a custom mini-batch generator in Tensorflow 2.0 using tf.data.Dataset API. Concretely, I have image data, 100 classes with ~200 examples each. For each mini-batch, I want to ...
Čedomir Lukić's user avatar
-2 votes
1 answer
1k views

I am trying to classify sequences by a binary feature. I have a dataset of sequence/label pairs and am using a simple one-layer LSTM to classify each sequence. Before I implemented minibatching, I was ...
glarik's user avatar
  • 1