xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 2KB
    文件類(lèi)型: .py
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-16
  • 語(yǔ)言: Python
  • 標(biāo)簽: tensor??

資源簡(jiǎn)介

tensorflow實(shí)現(xiàn)服裝類(lèi)別分類(lèi),包括模型訓(xùn)練、驗(yàn)證及保存,例子本身從tensorflow官網(wǎng)學(xué)習(xí)而來(lái),親自進(jìn)行了實(shí)現(xiàn),代碼可用。環(huán)境搭建可參考個(gè)人博文。

資源截圖

代碼片段和文件信息

#!/usr/bin/env?python?
#?-*-?coding:utf-8?-*-

#?TensorFlow?and?tf.keras
import?tensorflow?as?tf
from?tensorflow?import?keras

#?Helper?libraries
import?numpy?as?np
import?matplotlib.pyplot?as?plt

fashion_mnist?=?keras.datasets.fashion_mnist

(train_images?train_labels)?(test_images?test_labels)?=?fashion_mnist.load_data()

class_names?=?[‘T-shirt/top‘?‘Trouser‘?‘Pullover‘?‘Dress‘?‘Coat‘
???????????????‘Sandal‘?‘Shirt‘?‘Sneaker‘?‘Bag‘?‘Ankle?boot‘]

train_images.shape;

train_labels_len?=?len(train_labels);
print(train_labels_len)
print(train_labels)

test_images.shape

test_labels_len?=?len(test_labels);
print(test_labels_len)
print(test_labels)

#?plt.figure()
#?plt.imshow(train_images[0])
#?plt.colorbar()
#?plt.grid(False)
#?plt.show()
train_images?=?train_images?/?255.0

test_images?=?test_images?/?255.0

#?plt.figure(figsize=(1010))
#?for?i?in?range(25):
#?????plt.subplot(55i+1)
#?????plt.xticks([])
#?????plt.yticks([])
#?????plt.grid(F

評(píng)論

共有 條評(píng)論

相關(guān)資源