- Use anaconda to install open cv
- Can run code on GPU with CUDA
- Rubric Dog Breed Classifier Convolution Neural Network
numpy.squeeze
Remove single-dimensional entries from the shape of an array.
Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised.
>>> import numpy as np
>>> test = np.array([[[1],[3],[1]]])
>>> np.squeeze(test)
array([1, 3, 1])
>>> np.squeeze(test).shape
(3,)
test = np.array([[[1,2],[3,4],[1,5]]])
>>> test2 = np.squeeze(test)
>>> test2
array([[1, 2],
[3, 4],
[1, 5]])
End of code snippet
No comments:
Post a Comment