-
Keras
# tutorialspoint
SIMPLY EASY LEARNING
www.tutorialspoint.com
## About the Tutorial
Keras is an open source deep learning framework for python. It has been developed by an artificial intelligence Netflix, Huawei and Uber are currently using Keras. This tutorial walks through the installation of Keras, basics of deep learning, Keras models, Keras layers, Keras modules and finally conclude with some real-time network framework. This tutorial is intended to make you comfortable in getting started with the Keras framework concepts.
## Prerequisites
Before proceeding with the various types of concepts given
0 码力 |
98 页 |
1.57 MB
| 2 年前 3
-
for install Keras on Anaconda3:
For some machines, you might find difficulties by following the official document of installing Keras for RStudio. There is the alternative to install Keras and Tensorflow r-tensorflow
4 conda install -c conda-forge r-keras
C) Open the RStudio and run the following deep learning model to check the installation works:
library(keras)
mnist <- dataset_mnist()
train_images 10)
test_labels <- to_categorical(test_labels, 10)
# defining the model and layers
model <- keras_model_sequential()
model %>%
layer_dense(units = 256, activation = 'relu', #Fully connected
0 码力 |
3 页 |
654.13 KB
| 1 年前 3
-
# Keras: 基于 Python 的深度学习库 Keras: The Python Deep Learning library $ ^{*} $
Author: Keras-Team
Contributor: 万震 (WAN Zhen)
wanzhenchn
wanzhen@cqu.edu.cn
2018年12月24日
## 前言
整理 Keras: 基于 Python 的深度学习库 的深度学习库 PDF 版的主要原因在于学习 Keras 深度学习库时方便本地查阅,下载最新 PDF 版本请访问: https://github.com/wanzhenchn/keras-docs-zh。
感谢 keras-team 所做的中文翻译工作,本文档制作基于此处。
严正声明:本文档可免费用于学习和科学研究,可自由传播,但切勿擅自用于商业用途,由此引发一切后果贡献者概不负责。
The main on the Chinese Keras Markdown is that it is easy to read locally when learning the Keras Deep Learning Library. For the latest PDF version, please visit https://github.com/wanzhenchn/keras-docs-zh.
Thanks
0 码力 |
257 页 |
1.19 MB
| 2 年前 3
-
项目进阶实战》视频课程
快速上手篇:动手训练模型和部署服务
## 目录
- TensorFlow 2 开发环境搭建
- 使用 tf.keras.datasets 加载数据
- 使用 tf.data.Dataset 加载数据
- 使用 tf.keras.Model 管理模型
- Fashion MNIST 数据集介绍
- 使用 TensorFlow 2 训练分类网络
TensorFlow ▼
Name ↓
☐ tensorflow-tutorials
## Try it!
使用 tf.keras.datasets 加载数据
#### 使用 tf.keras.datasets 预置数据集
### tf.graph_util
tf.image
tf.io
tf.keras
Overview
Input
Model
Sequential
activations
applications initializers
#### Module: tf.keras.datasets

TensorFlow 1 version
Public API for tf.keras.datasets namespace.
## Modules
0 码力 |
52 页 |
7.99 MB
| 2 年前 3
-
[Image](/uploads/documents/7/b/5/8/7b58a13dc048f4445e8d5567c733b603/p7_2.jpg)
Simplified APIs.
Focused on Keras and
eager execution
Easy

NumPy

K Keras
PyTorch
## TensorFlow
2.0
## TensorFlow 2 构建生态
),
tf.keras.layers.Dense(512, activation=tf.nn.relu),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10 constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-pack
0 码力 |
38 页 |
4.85 MB
| 2 年前 3
-
| import tensorflow as tf |
| classifier = tf.keras.models.load_model("models/ResNet50/ResNet50_classified.h5") |
classifier )
plt.axis('off')
plt.show()
return img_tensor
from tensorflow.keras.preprocessing import image
from tensorflow.keras.applications.imagenet_utils import preprocess_input
test_image_path = 'test_1 detector
# import keras
import keras
# import keras_retinanet
from keras_retinanet import models
from keras_retinanet.utils.image import read_image_bgr, preprocess_image, resize_image
from keras_retinanet.utils 0 码力 |
54 页 |
6.30 MB
| 2 年前 3 -
set_weights(block.get_weights())
if block.name in prunables:
clone_block = tfmot.sparsity.keras.prune_low_magnitude(clone_block)
return clone_block
model_for_pruning = models.clone_model( pruning wrappers to
update the wrappers after each optimization step.
update_pruning = tfmot.sparsity.keras.UpdatePruningStep()
callbacks = [update_pruning]
tds = train_prep_ds.cache().shuffle(1000,
library as shown below.
# Strip the pruning wrappers from the model.
stripped_model = tfmot.sparsity.keras.strip_pruning(model_for_pruning)
The stripped_model is a sparse model after cleaning up the pruning 0 码力 |
34 页 |
3.18 MB
| 2 年前 3 -
with tokenize, by truncating
# the rest of the sequence.
max_seq_len = 100
vectorization_layer = tf.keras.layers.TextVectorization(
max_tokens=vocab_size,
output_sequence_length=max_seq_len)
Once embedding_tensor=word2vec_embeddings):
return tf.keras.layers.Embedding(
vocab_size,
embedding_dim_size,
embeddings_initializer=tf.keras.initializers.Constant(
word2vec_embeddings) layers.
def get_untrained_embedding_layer(trainable=True, embedding_dim_size=250):
return tf.keras.layers.Embedding(
vocab_size,
embedding_dim_size,
trainable=trainable,
0 码力 |
53 页 |
3.92 MB
| 2 年前 3
|