def LoadNet(self,model,weights): caffe.set_mode_gpu() caffe.set_device(0) Net = caffe.Net(model, weights, caffe.TEST) return Net