发布时间:2022-09-12 02:30
参考Py之keras-resnet: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
pip install keras-resnet
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)