Questions tagged [momentum]

80 questions
0
votes
1 answer

Use a lag on an specific function

I am programming a function in order to get an over the sample simulation. My function is the following: oos <- function(alpha, rho,rv){ ar_oos <-(alpha + rho*rv) return(ar_oos) } I define now arbitrary the values of alpha and rho: rho…
0
votes
2 answers

How to keep player momentum after jumping (2D)?

I'm creating a Mario clone and I need to keep the player's forward momentum into the jump and then onward into the landing. I can't figure out how to achieve this. Every time I land, the player has to build up momentum again. Any Idea how to fix…
Evan
  • 77
  • 8
0
votes
0 answers

Accumulating a variable while updating dict values? (Trying to implement SGD + momentum)

So I have the following dictionary implemented for vanilla SGD: update_weights = dict(zip(weight_keys, [grad_weight[key] - lr * convert_to_tensor(dx[key])]) for key in…
0
votes
1 answer

Why is there just one momentum parameter in keras Batchnorm?

I am new to CNN and was implementing Batchnorm in CNN using keras. The Batch norm layer has 4*Feature_map(of prev layer) parameters. Which are as follows: 2 are gamma and beta The other 2 are for the exponential moving average of the mean and…
0
votes
1 answer

How to dynamically update batch norm momentum in TF2?

I found a PyTorch implementation that decays the batch norm momentum parameter from 0.1 in the first epoch to 0.001 in the final epoch. Any suggestions on how to do this with the batch norm momentum parameter in TF2? (i.e., start at 0.9 and end at…
0
votes
1 answer

Javascript Inertial side scroll on mouseover

As I was looking through Killers Music html5 site, I wanted to do what they did with main navigation where when mouse is over to left or right, it will scroll infinite. I have when through their javascript file, also inspected elements and one thing…
user484312
  • 13
  • 3
0
votes
1 answer

tensorflow Optimizer: Attempting to use uninitialized value fc.bias/Momentum

Here is the thing. I build a trained network and save .meta and .data in ckpt. The optimizer is MomentumOptimizer: tf.train.MomentumOptimizer(learning_rate=lr, momentum=0.9, name='Momentum'), which is also saved in .meta. But I forget to save…
WBR
  • 57
  • 1
  • 11
0
votes
1 answer

How to open a custom protocol url with urllib?

I use chrome Momentum extension to customize my browser new tab and would like to write a python script to get its daily dashboard wallpaper By now I know I can reach desired page through the url…
0
votes
0 answers

Why does my simulation compute only a certain number of digits before only changing the power magnitude?

I am using another person's code to try and demonstrate this problem in physics: a large mass M collides with a smaller mass m, which then moves moves to rebound off a wall returning to collide with the larger mass M. This process repeats until…
0
votes
1 answer

why is gradient descent with momentum an exponentially weighted average?

I recently watched Andrew Ng's video on SGDM. I understand that the momentum term updates the gradient by weighting the last gradient and using a small component of V_dw. I don't understand why momentum is also known as exponentially weighted…
0
votes
2 answers

Get name of slots for momentum optimizer in tensorflow

I want to get names of slots from Momentum optimizer in tensorflow with using get_slot_names as it is explained here in tensorflow webpage. I am using following line in my code to get them: slots=tf.train.MomentumOptimizer(learning_rate=1e-3,…
amor
  • 121
  • 2
  • 13
0
votes
1 answer

TensorFlow - Combining gradients for multiple target objectives when using a momentum optimizer?

If I'm using a optimizer that uses momentum (e.g. AdamOptimizer) and I have a graph which splits at the end leading to two values I'm trying to simultaneously minimize, I can use compute_gradients twice attempting to minimize each value. This…
golmschenk
  • 11,736
  • 20
  • 78
  • 137
0
votes
1 answer

Tensorflow MomentumOptimizer issue

When I run the following simple code, I get this error: tensorflow.python.framework.errors.FailedPreconditionError: Attempting to use uninitialized value Variable_5/Momentum This code works with GradientDescentOptimizer, but I have the error with…
Afshin Oroojlooy
  • 1,326
  • 3
  • 21
  • 43
0
votes
1 answer

1 period TS lag return (ROC) to mimic stock momentum

I am relatively new to R and have read as much as I have been able to on the topic but can't seem to find what I am looking for on the other questions. I am looking to calculate the rate of change (momentum) using TTR and ROC for 12 periods, using…
0
votes
1 answer

Adding momentum term in online back propagation weight update?

I have implemented the ANN for two-layer network, I need to modify my weight update code with momentum, but i need to know how can i update it. below is the code snap of only weight update. The below code updates weight for each example it has seen,…