这里是一个使用CNN做故障诊断的简单代码:
import numpy as np import keras from keras.models import Sequential from keras.layers import Dense, Conv2D, Flatten
#create model model = Sequential()
#add model layers model.add(Conv2D(64, kernel_size=3, activation="relu", input_shape=(28,28,1))) model.add(Conv2D(32, kerne