基于keras搭建神经网络实现肺炎x片识别 完整代码数据

付完整的代码数据------

结果:

导入库:

In [4]:

import re
import os
import random
import numpy as np
import pandas as pd
import tensorflow as tf
import matplotlib.pyplot as plt

try:
    tpu = tf.distribute.cluster_resolver.TPUClusterResolver.connect()
    print("Device:", tpu.master())
    strategy = tf.distribute.TPUStrategy(tpu)
except:
    strategy = tf.distribute.get_strategy()
print("Number of replicas:", strategy.num_replicas_in_sync)
Number of replicas: 1

In [5]:

AUTOTUNE = tf.data.AUTOTUNE#
BATCH_SIZE = 25 * strategy.num_replicas_in_sync
IMAGE_SIZE = [180, 180]
CLASS_NAMES = ["NORMAL&

猜你喜欢

转载自blog.csdn.net/qiqi_ai_/article/details/131581431
今日推荐