a future version. Instructions for updating: Use `tf.keras.layers.Conv2D` instead. flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.flatten instead. dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. dropout (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dropout instead. JTEFQSFDBUFEBOEXJMMCFSFNPWFEJOBGVUVSFWFSTJPO
activation='relu') self.flatten = Flatten() self.d1 = Dense(128, activation='relu') self.d2 = Dense(10, activation='softmax') def call(self, x): x = self.conv1(x) x = self.flatten(x) x = self.d1(x) return self.d2(x) # Create an instance of the model model = MyModel() Ϟσϧͷఆٛ
ɺKeras API Λ௨ͯ͡ quantization-aware training Λαϙʔτ͢ΔํͰ࡞Γ͠ͱ߹ཧԽΛקΊ͍ͯΔ࠷தͰ͢ɻ ৽͍͠ quantization API ͕ϩʔϯν ͞ΕΔ·Ͱɺ͜ΕΒͷଐੑ 2.0 API ͔Βআ͞Ε·͢ɻ ॻ͖͑ؔʹΑͬͯϞσϧΛม͍ͨ͠߹ tf.compat.v1.TFLiteConverter Λ͍ͬͯͩ͘͞ɻ IUUQTXXXUFOTPSqPXPSHMJUFDPOWFSUQZUIPO@BQJRVBOUJ[BUJPOBXBSF@USBJOJOH