Py之keras-resnet:keras-resnet的简介、安装、使用方法之详细攻略

2022-09-02 20:23:30 浏览数 (2)

keras-resnet的简介

Keras-ResNet is the Keras package for deep residual networks. It's fast and flexible. Keras- resnet是用于深度剩余网络的Keras包。它又快又灵活。

github:https://github.com/broadinstitute/keras-resnet

keras-resnet的安装

pip install keras-resnet

keras-resnet使用方法

代码语言:javascript复制
import keras

import keras_resnet.models


shape, classes = (32, 32, 3), 10

x = keras.layers.Input(shape)

model = keras_resnet.models.ResNet50(x, classes=classes)

model.compile("adam", "categorical_crossentropy", ["accuracy"])

(training_x, training_y), (_, _) = keras.datasets.cifar10.load_data()

training_y = keras.utils.np_utils.to_categorical(training_y)

model.fit(training_x, training_y)

0 人点赞