def runSparseTraining(self, sess): ''' Function to run the Sparse Retraining routine on Bonsai Obj ''' currW = self.bonsaiObj.W.eval() currV = self.bonsaiObj.V.eval() currT = self.bonsaiObj.T.eval() newW = utils.copySupport(self.__thrsdW, currW) newV = utils.copySupport(self.__thrsdV, currV) newT = utils.copySupport(self.__thrsdT, currT) fd_st = {self.__Wth: newW, self.__Vth: newV, self.__Tth: newT} sess.run(self.sparseRetrainGroup, feed_dict=fd_st)
def runSparseTraining(self, sess): ''' Function to run the Sparse Retraining routine on FastObj ''' self.reTrainParams = [] for i in range(0, self.totalMatrices): self.reTrainParams.append( utils.copySupport(self.thrsdParams[i], self.FastParams[i].eval())) fd_st = {} for i in range(0, self.totalMatrices): fd_st[self.paramPlaceholders[i]] = self.reTrainParams[i] sess.run(self.sparseRetrainGroup, feed_dict=fd_st)