Questions tagged [sgd]

63 questions
0
votes
1 answer

Is it something wrong with torch.optim.SGD with momentum

It seems that torch.optim.SGD may have a bug when momentum is added. From my understanding, one can implement SGD with momentum by simply providing some value for the momentum argument, such as torch.optim.SGD(params, lr=0.01, momentum=0.9) I…
user559678
  • 11
  • 2
0
votes
3 answers

Getting AttributeError: 'SGD' object has no attribute 'defaults' in SimSwap Colab

I'm new to using python and code based programming language, but I'm trying to branch out by using Colab programs in an effort to understand a little of the application. I've been using this Colab for a little while (I don't have a GPU that can run…
0
votes
0 answers

return clients gradients and norm from tf.function in tensorflow federated

@tf.function def update(model, dataset, weights, optimizer): trainable_weights = model.trainable_variables tf.nest.map_structure(lambda x, y: x.assign(y), trainable_weights, weights) for batch in dataset: with…
0
votes
0 answers

Problem with implementation manual Linear Regression using Stochastic Gradient Descent

I am working with a real estate dataset, the size of which is about 21 thousand, the size of the training data is 15129. There are 15 features. The task is to implement manual linear regression using SGD and compare features weights with the weights…
dsivan
  • 1
  • 1
0
votes
0 answers

Parallel SGD (local SGD) implementation in TensorFlow?

While training a DNN in a distributed manner, I would like to use Local SGD (also known as K-AVG SGD or Parallel SGD) for reducing the communication overhead by diminishing the number of synchronization points. However, I am unable to find an…
0
votes
1 answer

Linear regression with SGD using pyspark.ml.linearegression

I'm using the LinearRegression model in the Spark ML for prediction. import pyspark.ml.regression.LinearRegression featureassembler = VectorAssembler(inputCols=[‘Year’, ‘Present_Price’, ‘Kms_Driven’,…
0
votes
0 answers

How to change config file to start fine tuning?

I am working on word detection and using MMOCR’s ‘DBNetpp’ detection model, please refer [2202.10304] Real-Time Scene Text Detection with Differentiable Binarization and Adaptive Scale Fusion. I want to use this pre-trained model and fine tune on my…
aarya
  • 83
  • 1
  • 8
0
votes
0 answers

ValueError: x and y can be no greater than 2-D, but have shapes (6,) and (6, 15, 15)

assignment:Implement SGD Classifier with Logloss and L2 regularization Using SGD without using sklearn

Initialize the weight_vector and intercept term to zeros (Write your code in def initialize_weights())

Create a loss function (Write your…
mahesh mj
  • 15
  • 1
  • 5
0
votes
1 answer

SDG with batch size >1?

I'm taking the "Deep NNs with PyTorch" course by IBM and I encountered lab examples where SDG is used for optimizer while batch size is >1 in DataLoader. If I understand correctly, SGD would perform gradient descent with only 1 training example in…
TMK
  • 1
  • 1
0
votes
2 answers

Having issues with SGD/Keras in my AI chatbot

Hello there guys. First time making a post here. So I am trying to make an AI chatbot using Python, in a Pycharm IDLE. While trying to start training the neural network that would enable the chatbot to work, I ran into this error and was unable to…
Adesti
  • 28
  • 7
0
votes
1 answer

How are parameters updated with SGD-Optimizer?

So I have found a formula describing the SGD-Descent θ = θ-η*∇L(θ;x,y) Where θ is a parameter, η is the learning rate and ∇L() is the gradient descent of the loss-function. But what I don't get is how the parameter θ (which should be weight and…
tryg
  • 13
  • 4
0
votes
1 answer

Getting "TypeError: 'numpy.ndarray' object is not callable" from shuffle call for Fashion-MNIST

I have been trying to implement Mini-Batch optimisation on a CNN with SGD. But in trying the randomised sample selection using shuffle() I am getting the error in the Title. The code is as below. Could there be a header problem or there is something…
0
votes
0 answers

Error in a loop performing SGD with a pytorch model

within a function used to perform stochastic gradient descent, I have this loop over all batches and over all input-output pair within a batch: train_points_loader = DataLoader(train_points, batch_size=64, shuffle=True, num_workers=1) for batch,…
mlqa
  • 1
  • 1
0
votes
2 answers

Error while running a SGD optimizer for building CNN

i get following error while running a SGD optimizer for building a CNN --> 146 optimizer = SGD(0.01, 0.8, 0.0005, nesterov=True) 147 model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy']) 148 #Train the…
MSK
  • 11
  • 4
0
votes
0 answers

Secure Global Desktop(SGD) certification?

I have a problem with updating SGD certificate on my local machine. I am using a self-signed certificate, and can't get the certificate to change the valid from field (ends in 2022) although the new certificate in the .pem file is valid till…
Dain L
  • 1
  • 2