
deep learning with keras
luoganttcc
微信:luogantt2
展开
-
tensorflow Lambda用法
import numpy as npfrom tensorflow.keras.layers import Lambdaimport tensorflow as tfx=np.array([[1,2],[3,4]])x = Lambda(lambda x: x**2)(x)print(x)print('---------------------------------------')x = Lambda(lambda x: tf.reshape(x, (-1,x.shape[1],原创 2021-06-07 18:29:28 · 2482 阅读 · 0 评论 -
Conv2D 理解
import tensorflow as tf# The inputs are 28x28 RGB images with `channels_last` and the batch# size is 4.input_shape = (4, 28, 28, 3)x = tf.random.normal(input_shape)y = tf.keras.layers.Conv2D(20, 5, activation='relu',padding='valid',strides=4, input_s原创 2021-06-07 13:40:02 · 384 阅读 · 0 评论 -
神经网络可视化
import netronnetron.start("s2s.h5")代码链接原创 2020-05-20 21:16:40 · 395 阅读 · 0 评论 -
deep learning with keras (二) lenet 对手写数字识别
# import the necessary packagesfrom keras import backend as Kfrom keras.models import Sequentialfrom keras.layers.convolutional import Conv2Dfrom keras.layers.convolutional import MaxPooling2Dfro...转载 2018-03-31 16:43:25 · 360 阅读 · 0 评论 -
deep learning with keras
代码下载原创 2018-03-29 16:29:14 · 579 阅读 · 0 评论 -
deep learning with keras (一) 用CNN 对 cifar 分类
from keras.datasets import cifar10from keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers.core import Dense, Dropout, Activation, Flattenfrom keras.layers.convolutiona...转载 2018-03-29 16:52:07 · 433 阅读 · 0 评论 -
keras cnn 代码详解
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Sun Sep 30 18:00:30 2018这是用keras搭建的简单的cnn 网络@author: lg"""##import kerasfrom keras.datasets import cifar10from keras.models impor...原创 2018-10-05 14:07:10 · 3192 阅读 · 0 评论 -
keras实现 vgg16
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Sun Sep 30 17:12:12 2018这是用keras搭建的vgg16网络这是很经典的cnn,在图像和时间序列分析方面有很多的应用@author: lg"""#################import kerasfrom keras.data...原创 2018-10-05 15:07:19 · 10839 阅读 · 4 评论