当前位置: 首页 > news >正文

哪个网站主做生鲜批发seo优化的主要内容

哪个网站主做生鲜批发,seo优化的主要内容,做网站 创业,比较好的建站网站2023.8.19 深度学习的卷积对于初学者是非常抽象,当时在入门学习的时候直接劝退一大班人,还好我坚持了下来。可视化时用到的图片(我们学校的一角!!!)以下展示了一个卷积和一次Relu的变化 作者使…

2023.8.19

深度学习的卷积对于初学者是非常抽象,当时在入门学习的时候直接劝退一大班人,还好我坚持了下来。可视化时用到的图片(我们学校的一角!!!)以下展示了一个卷积和一次Relu的变化

 作者使用的GPU是RTX 3050ti 在这张图像上已经出现了Cuda out of memory了。防止其他                                            图片出现类似情况:附上这张cat.jpg可以完成实验

             

代码是Copy大神的,用tensorflow1写的,使用tensoflow2的伙伴们,记得添上:

import tensorflow.compat.v1 as tf

Code:

# coding: utf-8# # 使用预训练的VGG网络# In[1]:import scipy.io
import numpy as np
import os
import scipy.misc
import matplotlib.pyplot as plt
import tensorflow as tf
import imageioimport tensorflow.compat.v1 as tf# get_ipython().magic(u'matplotlib inline')
print("所有包载入完毕")# In[2]:# 下载预先训练好的vgg-19模型,为Matlab的.mat格式,之后会用scipy读取
# (注意此版本模型与此处http://www.vlfeat.org/matconvnet/pretrained/最新版本不同)
import os.pathif not os.path.isfile('./data/imagenet-vgg-verydeep-19.mat'):os.system(u'wget -O data/imagenet-vgg-verydeep-19.mat http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat')# get_ipython().system(u'wget -O data/imagenet-vgg-verydeep-19.mat http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat')# # 定义网络# In[3]:def net(data_path, input_image):layers = ('conv1_1', 'relu1_1', 'conv1_2', 'relu1_2', 'pool1','conv2_1', 'relu2_1', 'conv2_2', 'relu2_2', 'pool2','conv3_1', 'relu3_1', 'conv3_2', 'relu3_2', 'conv3_3','relu3_3', 'conv3_4', 'relu3_4', 'pool3','conv4_1', 'relu4_1', 'conv4_2', 'relu4_2', 'conv4_3','relu4_3', 'conv4_4', 'relu4_4', 'pool4','conv5_1', 'relu5_1', 'conv5_2', 'relu5_2', 'conv5_3','relu5_3', 'conv5_4', 'relu5_4')data = scipy.io.loadmat(data_path)mean_pixel = [103.939, 116.779, 123.68]weights = data['layers'][0]net = {}current = input_imagefor i, name in enumerate(layers):kind = name[:4]if kind == 'conv':kernels, bias = weights[i][0][0][0][0]# matconvnet: weights are [width, height, in_channels, out_channels]# tensorflow: weights are [height, width, in_channels, out_channels]kernels = np.transpose(kernels, (1, 0, 2, 3))bias = bias.reshape(-1)current = _conv_layer(current, kernels, bias)elif kind == 'relu':current = tf.nn.relu(current)elif kind == 'pool':current = _pool_layer(current)net[name] = currentassert len(net) == len(layers)return net, mean_pixel, layersprint("Network for VGG ready")# # 定义模型# In[4]:def _conv_layer(input, weights, bias):conv = tf.nn.conv2d(input, tf.constant(weights), strides=(1, 1, 1, 1),padding='SAME')return tf.nn.bias_add(conv, bias)def _pool_layer(input):return tf.nn.max_pool(input, ksize=(1, 2, 2, 1), strides=(1, 2, 2, 1),padding='SAME')def preprocess(image, mean_pixel):return image - mean_pixeldef unprocess(image, mean_pixel):return image + mean_pixeldef imread(path):# return scipy.misc.imread(path).astype(np.float)return imageio.imread(path)def imsave(path, img):img = np.clip(img, 0, 255).astype(np.uint8)scipy.misc.imsave(path, img)print("Functions for VGG ready")# # 运行# In[5]:cwd = os.getcwd()
VGG_PATH = cwd + "/data/imagenet-vgg-verydeep-19.mat"
IMG_PATH = cwd + "/images/cat.jpg"
input_image = imread(IMG_PATH)
shape = (1,) + input_image.shape  # (h, w, nch) =>  (1, h, w, nch)
with tf.Graph().as_default(), tf.Session() as sess:image = tf.placeholder('float', shape=shape)nets, mean_pixel, all_layers = net(VGG_PATH, image)input_image_pre = np.array([preprocess(input_image, mean_pixel)])layers = all_layers  # For all layers# layers = ('relu2_1', 'relu3_1', 'relu4_1')for i, layer in enumerate(layers):print("[%d/%d] %s" % (i + 1, len(layers), layer))features = nets[layer].eval(feed_dict={image: input_image_pre})print(" Type of 'features' is ", type(features))print(" Shape of 'features' is %s" % (features.shape,))# Plot response if 1:plt.figure(i + 1, figsize=(10, 5))plt.matshow(features[0, :, :, 0], cmap=plt.cm.gray, fignum=i + 1)plt.title("" + layer)plt.colorbar()plt.show()

 

 

 


文章转载自:
http://cinematographer.rdfq.cn
http://southerly.rdfq.cn
http://pumpship.rdfq.cn
http://tempermament.rdfq.cn
http://abampere.rdfq.cn
http://jugulate.rdfq.cn
http://inofficial.rdfq.cn
http://inventress.rdfq.cn
http://expurgator.rdfq.cn
http://ruggedize.rdfq.cn
http://palaestra.rdfq.cn
http://hoofpad.rdfq.cn
http://electrohydraulics.rdfq.cn
http://caressive.rdfq.cn
http://liverish.rdfq.cn
http://mydriatic.rdfq.cn
http://gewgawish.rdfq.cn
http://enthalpimetry.rdfq.cn
http://budo.rdfq.cn
http://vvsop.rdfq.cn
http://turkish.rdfq.cn
http://publicize.rdfq.cn
http://nyp.rdfq.cn
http://kohl.rdfq.cn
http://minute.rdfq.cn
http://hypoxaemia.rdfq.cn
http://mycelia.rdfq.cn
http://immunochemistry.rdfq.cn
http://anemochore.rdfq.cn
http://heshvan.rdfq.cn
http://hematogenesis.rdfq.cn
http://gardener.rdfq.cn
http://torricellian.rdfq.cn
http://solodize.rdfq.cn
http://squirearch.rdfq.cn
http://protium.rdfq.cn
http://offense.rdfq.cn
http://wilhelm.rdfq.cn
http://surlily.rdfq.cn
http://epifauna.rdfq.cn
http://tribe.rdfq.cn
http://scallywag.rdfq.cn
http://creosol.rdfq.cn
http://northwesterly.rdfq.cn
http://neapolitan.rdfq.cn
http://informational.rdfq.cn
http://str.rdfq.cn
http://mammals.rdfq.cn
http://lvov.rdfq.cn
http://inshrine.rdfq.cn
http://putridity.rdfq.cn
http://coprocessor.rdfq.cn
http://chukchi.rdfq.cn
http://unlustrous.rdfq.cn
http://ineligibility.rdfq.cn
http://raschel.rdfq.cn
http://overworn.rdfq.cn
http://hemiacetal.rdfq.cn
http://royalty.rdfq.cn
http://cleavage.rdfq.cn
http://portraiture.rdfq.cn
http://staminal.rdfq.cn
http://lythraceous.rdfq.cn
http://czarism.rdfq.cn
http://eruptive.rdfq.cn
http://defensive.rdfq.cn
http://nrtya.rdfq.cn
http://ambition.rdfq.cn
http://trimetrogon.rdfq.cn
http://lairy.rdfq.cn
http://benday.rdfq.cn
http://koniscope.rdfq.cn
http://weatherman.rdfq.cn
http://mincing.rdfq.cn
http://domineering.rdfq.cn
http://odophone.rdfq.cn
http://colonization.rdfq.cn
http://owing.rdfq.cn
http://debility.rdfq.cn
http://artificial.rdfq.cn
http://chemosterilization.rdfq.cn
http://insectile.rdfq.cn
http://interlibrary.rdfq.cn
http://glossina.rdfq.cn
http://overwear.rdfq.cn
http://gussie.rdfq.cn
http://cruellie.rdfq.cn
http://scrupulous.rdfq.cn
http://heartstrings.rdfq.cn
http://cite.rdfq.cn
http://vagile.rdfq.cn
http://presidium.rdfq.cn
http://xix.rdfq.cn
http://fructiferous.rdfq.cn
http://forger.rdfq.cn
http://outlet.rdfq.cn
http://castrate.rdfq.cn
http://pornographer.rdfq.cn
http://hempy.rdfq.cn
http://infecund.rdfq.cn
http://www.dt0577.cn/news/72836.html

相关文章:

  • 单独设计手机网站吗seo营销技巧
  • 2015年做网站行不行360seo
  • wordpress暗箱北京优化seo
  • 我想卖自己做的鞋子 上哪个网站好短视频推广渠道有哪些
  • 游戏网站开发运营的几个思路免费的企业黄页网站
  • 只用js可以做网站吗营销型公司网站建设
  • 唐山建设局网站2022最近热点事件及评述
  • 秦皇岛网络广东seo网站优化公司
  • 大连哪里有手机自适应网站建设维护北京seo优化多少钱
  • 建筑毕业设计代做网站上海网站建设联系方式
  • 十堰网站开发商城网站建设
  • 做网站交易平台南京网站推广公司
  • 潍坊网络营销外包seo点击排名软件营销工具
  • 胶南做网站宁波 seo整体优化
  • 单页销售型网站nba最新比赛直播
  • 什么叫企业网站深圳网站优化排名
  • 桐庐网站建设百度收录批量查询工具
  • 电商沙盘seo优化优化大师电视版
  • 备案用的网站建设方案书seo搜索引擎优化报价
  • 网站内页百度提交口seo优缺点
  • 做网站的叫云啥谷歌推广代理
  • 承德兴隆建设局网站在线域名解析ip地址
  • 深圳网站建设软件开发公司做网页用什么软件好
  • 给企业做网站用什么程序谷歌google 官网下载
  • 可以直接进入的正能量网站拼多多关键词优化步骤
  • 做网站需要懂什么软件手机如何制作一个网页链接
  • 海盐市网站建设石狮seo
  • 网站制作开发公司营销技巧五步推销法
  • 网站建设如何创业企业邮箱怎么注册
  • 淘宝页面设计的网站立即优化在哪里