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

建设网站中存在的问题辽宁网站seo

建设网站中存在的问题,辽宁网站seo,做家居网站设计,做简历有什么网站Intro 这是深度学习第5课 在本课程结束时#xff0c;您将能够使用数据增强。 这个技巧让你看起来拥有的数据远远超过实际拥有的数据#xff0c;从而产生更好的模型。 Lesson [1] from IPython.display import YouTubeVideo YouTubeVideo(ypt_BAotCLo, width800, height45…Intro 这是深度学习第5课 在本课程结束时您将能够使用数据增强。 这个技巧让你看起来拥有的数据远远超过实际拥有的数据从而产生更好的模型。 Lesson [1] from IPython.display import YouTubeVideo YouTubeVideo(ypt_BAotCLo, width800, height450) Sample Code 我们有一些你以前见过的模型设置代码。 它暂时不是我们关注的焦点. [2] from tensorflow.python.keras.applications import ResNet50 from tensorflow.python.keras.models import Sequential from tensorflow.python.keras.layers import Dense, Flatten, GlobalAveragePooling2Dnum_classes 2 resnet_weights_path ../input/resnet50/resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5my_new_model Sequential() my_new_model.add(ResNet50(include_topFalse, poolingavg, weightsresnet_weights_path)) my_new_model.add(Dense(num_classes, activationsoftmax))# Say not to train first layer (ResNet) model. It is already trained my_new_model.layers[0].trainable Falsemy_new_model.compile(optimizersgd, losscategorical_crossentropy, metrics[accuracy]) Fitting a Model With Data Augmentation [3] from tensorflow.python.keras.applications.resnet50 import preprocess_input from tensorflow.python.keras.preprocessing.image import ImageDataGeneratorimage_size 224data_generator_with_aug ImageDataGenerator(preprocessing_functionpreprocess_input,horizontal_flipTrue,width_shift_range 0.2,height_shift_range 0.2)train_generator data_generator_with_aug.flow_from_directory(../input/urban-and-rural-photos/rural_and_urban_photos/train,target_size(image_size, image_size),batch_size24,class_modecategorical)data_generator_no_aug ImageDataGenerator(preprocessing_functionpreprocess_input) validation_generator data_generator_no_aug.flow_from_directory(../input/urban-and-rural-photos/rural_and_urban_photos/val,target_size(image_size, image_size),class_modecategorical)my_new_model.fit_generator(train_generator,steps_per_epoch3,epochs2,validation_datavalidation_generator,validation_steps1) Found 72 images belonging to 2 classes. Found 20 images belonging to 2 classes. Epoch 1/2 3/3 [] - 32s 11s/step - loss: 0.7974 - acc: 0.5556 - val_loss: 0.9505 - val_acc: 0.7000 Epoch 2/2 3/3 [] - 28s 9s/step - loss: 0.5379 - acc: 0.7639 - val_loss: 0.4675 - val_acc: 0.8000tensorflow.python.keras._impl.keras.callbacks.History at 0x7f8ce4375f60 Exercise:Data Augmentation Exercise Introduction 我们将返回您在上一个练习中处理的自动旋转问题。 我们还提供了您已经使用过的大部分代码。 复制这篇笔记并采取数据增加步骤下面的步骤2。 1) Specify and Compile the Model 这与您之前使用的代码的工作方式相同。 所以你在这里收到了它的完整版本。 运行此单元格以指定和编译模型 【4】 from tensorflow.python.keras.applications import ResNet50 from tensorflow.python.keras.models import Sequential from tensorflow.python.keras.layers import Dense, Flatten, GlobalAveragePooling2Dnum_classes 2 resnet_weights_path ../input/resnet50/resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5my_new_model Sequential() my_new_model.add(ResNet50(include_topFalse, poolingavg, weightsresnet_weights_path)) my_new_model.add(Dense(num_classes, activationsoftmax))my_new_model.layers[0].trainable Falsemy_new_model.compile(optimizersgd, losscategorical_crossentropy, metrics[accuracy]) 2) Fit the Model Using Data Augmentation 填写空白并取消注释这些代码行。 在这样做之后您可以运行此单元格您应该获得一个达到约90准确度的模型。 通过使用数据扩充您可以将错误率降低一半。 【5】 from tensorflow.python.keras.applications.resnet50 import preprocess_input from tensorflow.python.keras.preprocessing.image import ImageDataGeneratorimage_size 224# Specify the values for all arguments to data_generator_with_aug. Then uncomment those lines #data_generator_with_aug ImageDataGenerator(preprocessing_functionpreprocess_input # horizontal_flip _____, # width_shift_range ____, # height_shift_range ____)# data_generator_no_aug ImageDataGenerator(preprocessing_functionpreprocess_input)# Specify which type of ImageDataGenerator above is to load in training data #train_generator ____.flow_from_directory( # directory ../input/dogs-gone-sideways/images/train, # target_size(image_size, image_size), # batch_size12, # class_modecategorical)# Specify which type of ImageDataGenerator above is to load in validation data #validation_generator ____.flow_from_directory( # directory ../input/dogs-gone-sideways/images/val, # target_size(image_size, image_size), # class_modecategorical)#my_new_model.fit_generator( # ____, # specify where model gets training data # epochs 3, # steps_per_epoch19, # validation_data____) # specify where model gets validation data Keep Going 您已准备好深入了解深度学习。
http://www.pierceye.com/news/672175/

相关文章:

  • 网站备案 取名资讯通不过软文投放平台有哪些?
  • 民治做网站多少钱好看的企业网站首页
  • 腾讯域名怎么建设网站客户管理系统免费
  • 承德网站建设报价网站建设中企动力最佳a5
  • 图书馆第一代网站建设海口会计报名网站
  • 网站设计师简介中国工厂网站官方网站
  • 广州移动 网站建设十大职业资格培训机构
  • 网站建设维护协议书网站开发程序用什么好
  • 零基础做网站教程天猫商城商品来源
  • 广州知名网站建设公司教育机构培训
  • 做游戏解说上传在什么网站好企业网站定制
  • 用iis浏览网站南宁网站seo大概多少钱
  • 如何用手机网站做淘宝客wordpress 免费 旅游
  • 青岛网站建设网站制作seo顾问服务福建
  • phpcms网站织梦 网站栏目管理 很慢
  • 金融网站 改版方案seo推广优化培训
  • 博物馆设计网站推荐网站布局有哪些常见的
  • 外贸网站建设980ps软件需要付费吗
  • 网站开发后的经验总结北新泾街道网站建设
  • 深圳市南山区住房和建设局网站国内知名网站建设伺
  • 企业网站建设制作的域名费用做的网站怎么上传
  • c++可视化界面设计搜索引擎优化自然排名的区别
  • 网站开发工作网络营销的网站分类有
  • 校园网上零售网站建设方案网站建设中页面模板
  • 网站如何报备外贸网站设计风格
  • 网上的网站模板怎么用百度网站认证官网
  • 上饶企业网站建设免费制作小程序游戏
  • cps推广网站建e网卧室设计效果图
  • php支持大型网站开发吗南海最新消息
  • 多语言企业网站html网站素材