I have installed sklearn, numpy and matplotlib but, I am unable to properly install openBLAS although I have directly save dopenBLAS files in lib folder(site packages) but still its showing an error...kindly help me to make execute this small part of code for TensorFlow Convolutional Neural Network for Image Classification. I have taken this part of code from here https://github.com/rdcolema/tensorflow-image-classification/blob/master/cnn.ipynb
import matplotlib.pyplot as plt
import tensorflow as tf
import pandas as pd
import numpy as np
from sklearn.metrics import confusion_matrix
import time
from datetime import timedelta
import math
import dataset
import random
# Convolutional Layer 1.
filter_size1 = 3
num_filters1 = 32
# Convolutional Layer 2.
filter_size2 = 3
num_filters2 = 32
# Convolutional Layer 3.
filter_size3 = 3
num_filters3 = 64
# Fully-connected layer.
fc_size = 128 # Number of neurons in fully-connected layer.
# Number of color channels for the images: 1 channel for gray-scale.
num_channels = 3
# image dimensions (only squares for now)
img_size = 128
# Size of image when flattened to a single dimension
img_size_flat = img_size * img_size * num_channels
# Tuple with height and width of images used to reshape arrays.
img_shape = (img_size, img_size)
# class info
classes = ['dogs', 'cats']
num_classes = len(classes)
# batch size
batch_size = 16
# validation split
validation_size = .2
# how long to wait after validation loss stops improving before terminating
training
early_stopping = None # use None if you don't want to implement early
stoping
train_path = 'C:/Projects/playground/kaggle/dogs_vs_cats/data/train/'
test_path = 'C:/Projects/playground/kaggle/dogs_vs_cats/data/test/test/'
checkpoint_dir = "C:/Projects/playground/tensorflow/tf_image_clf/models/"
data = dataset.read_train_sets(train_path, img_size, classes,
validation_size=validation_size)
test_images, test_ids = dataset.read_test_set(test_path, img_size)
print("Size of:")
print("- Training-set:\t\t{}".format(len(data.train.labels)))
print("- Test-set:\t\t{}".format(len(test_images)))
print("- Validation-set:\t{}".format(len(data.valid.labels)))
Output on Python IDE :
Traceback (most recent call last):
File "D:\Users\aysharma\birdclassifier.py", line 5, in <module>
from sklearn.metrics import confusion_matrix
File "D:\Users\aysharma\AppData\Local\Programs\Python\Python35\lib\site-
packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "D:\Users\aysharma\AppData\Local\Programs\Python\Python35\lib\site-
packages\sklearn\base.py", line 10, in <module>
from scipy import sparse
File "D:\Users\aysharma\AppData\Local\Programs\Python\Python35\lib\site-
packages\scipy\__init__.py", line 122, in <module>
raise ImportError("Numpy OpenBLAS flavour is needed for this scipy
build.")
ImportError: Numpy OpenBLAS flavour is needed for this scipy build.