我正在运行此代码
import time
import tensorflow as tf
from keras.applications import vgg16, inception_v3, resnet50, mobilenet
print ("CLOADING vgg 16 MODEL : ",time.strftime("%I:%M:%S"))
with tf.device('/gpu:0'):
vgg_model = vgg16.VGG16(weights='imagenet')
print ("vgg MODEL loaded,inception loading: ",time.strftime("%I:%M:%S"))
#inception_model = inception_v3.InceptionV3(weights='imagenet')
#print ("inception loaded resnet loading: ",time.strftime("%I:%M:%S"))
resnet_model = resnet50.ResNet50(weights='imagenet')
print (",mobilenet loading : ",time.strftime("%I:%M:%S"))
mobilenet_model = mobilenet.MobileNet(weights='imagenet')
print ("end loading : ",time.strftime("%I:%M:%S"))
vgg16模型下载得很好,但是当它开始下载初始模型时,会引发错误:
tensorflow / core / platform / cpu_feature_guard.cc:141]您的CPU支持该TensorFlow二进制文件未编译为使用的指令:AVX AVX2
I tensorflow / core / common_runtime / gpu / gpu_device.cc:1405]找到具有属性的设备0: 名称:GeForce GT 750M主要:3次要:0 memoryClockRate(GHz):0.967 pciBusID:0000:02:00.0 totalMemory:2.00GiB空闲内存:1.66GiB
tensorflow / core / common_runtime / gpu / gpu_device.cc:1484]添加可见的gpu设备:0
tensorflow / core / common_runtime / gpu / gpu_device.cc:965]具有强度1边缘矩阵的设备互连StreamExecutor:
tensorflow / core / common_runtime / gpu / gpu_device.cc:971] 0
tensorflow / core / common_runtime / gpu / gpu_device.cc:984] 0:N
tensorflow / core / common_runtime / gpu / gpu_device.cc:1097]创建的TensorFlow设备(/ job:localhost /副本:0 / task:0 / device:GPU:0,具有1426 MB内存)‑>物理GPU(设备:0,名称:GeForce GT 750M,pci总线ID:0000:02:00.0,计算能力:3.0)