def setupValidate(self):
batch_size = self.cfgParams.batch_size
givens_val = {self.x: self.val_data_x[self.index * batch_size:(self.index + 1) * batch_size]}
givens_val[self.y] = self.val_data_y[self.index * batch_size:(self.index + 1) * batch_size]
print("compiling validation_error() ... ")
self.validation_error = theano.function(inputs=[self.index],
outputs=self.errors,
givens=givens_val)
print("done.")
print("compiling validation_cost() ... ")
self.validation_cost = theano.function(inputs=[self.index],
outputs=self.cost,
givens=givens_val)
print("done.")
# debug and so
print("compiling compute_val_descr() ... ")
givens_val_descr = {self.x: self.val_data_x[self.index * batch_size:(self.index + 1) * batch_size]}
self.compute_val_descr = theano.function(inputs=[self.index],
outputs=self.poseNet.output,
givens=givens_val_descr)
print("done.")
评论列表
文章目录