错误:这个scipy构建需要Numpy OpenBLAS风格。 (虽然我已将其文件直接保存在lib-> site packages文件夹中)

时间:2017-04-28 07:53:35

标签: python numpy tensorflow scipy openblas

我已经安装了sklearn,numpy和matplotlib但是,我无法正确安装openBLAS虽然我已经直接在lib文件夹(网站包)中保存了dopenBLAS文件,但仍然显示错误...请帮助我为TensorFlow卷积神经网络进行图像分类,执行代码的这一小部分。 我从这里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)))

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.

0 个答案:

没有答案