3cee81f6d6f9637d21aad32d360844f6ce7a90c4,framework/Optimizers/GradientBasedOptimizer.py,GradientBasedOptimizer,_removeRedundantTraj,#GradientBasedOptimizer#Any#Any#,294

Before Change


          inp = copy.deepcopy(self.optVarsHist[traj][updateKey]) //FIXME deepcopy needed?
          removeLocalFlag = True
          for var in self.optVars:
            if abs(inp[var] - currentInput[var]) > self.thresholdTrajRemoval:
              removeLocalFlag = False
              break
          if removeLocalFlag:

After Change


            continue
          removeLocalFlag = True
          dist = np.sqrt(np.sum(list((inp[var] - currentInput[var])**2 for var in self.getOptVars())))
          if dist < self.thresholdTrajRemoval:
            self.raiseADebug("Halting trajectory "{}" because it is following trajectory "{}"".format(trajToRemove,traj))
            self.trajectoriesKilled[traj].append(trajToRemove)
            //TODO the trajectory to remove should be chosen more carefully someday, for example, the one that has the smallest steps or lower loss value currently
            removeFlag = True
            break
        if removeFlag:
          break

    if removeFlag:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: idaholab/raven
Commit Name: 3cee81f6d6f9637d21aad32d360844f6ce7a90c4
Time: 2017-06-21
Author: paul.talbot@inl.gov
File Name: framework/Optimizers/GradientBasedOptimizer.py
Class Name: GradientBasedOptimizer
Method Name: _removeRedundantTraj


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: e70bdb2d089ae283781c45b8d97963823a984baa
Time: 2017-12-15
Author: max.lapan@gmail.com
File Name: ch10/00_pong_pg.py
Class Name:
Method Name:


Project Name: erichson/ristretto
Commit Name: 83579d7761d6bc995e1e6e90cd376191e648081e
Time: 2018-03-07
Author: Benli11@users.noreply.github.com
File Name: ristretto/nmf/rnmf_fhals.py
Class Name:
Method Name: rnmf_fhals