Commit 768cf5e1 authored by Carlos Alfredo Yeverino Rodriguez's avatar Carlos Alfredo Yeverino Rodriguez
Browse files

CNNTrainer.ftl: Corrected class instance for quick testing purposes

parent 32730d90
Pipeline #81198 passed with stages
in 5 minutes and 12 seconds
......@@ -68,11 +68,11 @@ if __name__ == "__main__":
elif context == 'gpu':
device_opts = core.DeviceOption(caffe2_pb2.CUDA, 0)
print("GPU mode selected")
</#list>
LeNet.load_net(LeNet.INIT_NET, LeNet.PREDICT_NET, device_opts=device_opts)
${config.instanceName}.load_net(${config.instanceName}.INIT_NET, ${config.instanceName}.PREDICT_NET, device_opts=device_opts)
</#list>
img = cv2.imread("3.jpg") # Load test image
img = cv2.imread("./test_img/3.jpg") # Load test image
img = cv2.resize(img, (28,28)) # Resize to 28x28
img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY ) # Covert to grayscale
img = img.reshape((1,1,28,28)).astype('float32') # Reshape to (1,1,28,28)
......
......@@ -15,6 +15,7 @@ if __name__ == "__main__":
emptyConfig = CNNCreator_emptyConfig.CNNCreator_emptyConfig()
emptyConfig.train(
)
print '\n********************************************'
......@@ -28,9 +29,9 @@ if __name__ == "__main__":
device_opts = core.DeviceOption(caffe2_pb2.CUDA, 0)
print("GPU mode selected")
LeNet.load_net(LeNet.INIT_NET, LeNet.PREDICT_NET, device_opts=device_opts)
emptyConfig.load_net(emptyConfig.INIT_NET, emptyConfig.PREDICT_NET, device_opts=device_opts)
img = cv2.imread("3.jpg") # Load test image
img = cv2.imread("./test_img/3.jpg") # Load test image
img = cv2.resize(img, (28,28)) # Resize to 28x28
img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY ) # Covert to grayscale
img = img.reshape((1,1,28,28)).astype('float32') # Reshape to (1,1,28,28)
......
......@@ -39,9 +39,9 @@ if __name__ == "__main__":
device_opts = core.DeviceOption(caffe2_pb2.CUDA, 0)
print("GPU mode selected")
LeNet.load_net(LeNet.INIT_NET, LeNet.PREDICT_NET, device_opts=device_opts)
fullConfig.load_net(fullConfig.INIT_NET, fullConfig.PREDICT_NET, device_opts=device_opts)
img = cv2.imread("3.jpg") # Load test image
img = cv2.imread("./test_img/3.jpg") # Load test image
img = cv2.resize(img, (28,28)) # Resize to 28x28
img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY ) # Covert to grayscale
img = img.reshape((1,1,28,28)).astype('float32') # Reshape to (1,1,28,28)
......
......@@ -32,9 +32,9 @@ if __name__ == "__main__":
device_opts = core.DeviceOption(caffe2_pb2.CUDA, 0)
print("GPU mode selected")
LeNet.load_net(LeNet.INIT_NET, LeNet.PREDICT_NET, device_opts=device_opts)
simpleConfig.load_net(simpleConfig.INIT_NET, simpleConfig.PREDICT_NET, device_opts=device_opts)
img = cv2.imread("3.jpg") # Load test image
img = cv2.imread("./test_img/3.jpg") # Load test image
img = cv2.resize(img, (28,28)) # Resize to 28x28
img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY ) # Covert to grayscale
img = img.reshape((1,1,28,28)).astype('float32') # Reshape to (1,1,28,28)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment