神经网络_使用tensorflow对fashion mnist衣服数据集分类

from tensorflow import keras 
import matplotlib.pyplot as plt

1.数据预处理

1.1 下载数据集

fashion_mnist = keras.datasets.fashion_mnist
#下载 fashion mnist数据集
(train_images, train_labels),(test_images, test_labels) = fashion_mnist.load_data()print("train_images shape ", train_images.shape)
print("train_labels shape ", train_labels.shape)
print("train_labels[0] ", train_labels[0])
train_images shape  (60000, 28, 28)
train_labels shape  (60000,)
train_labels[0]  9

1.2展示数据集的第一张图片

plt.figure()
plt.imshow(train_images[0])
plt.colorbar()
plt.grid(False)
plt.show
<function matplotlib.pyplot.show(close=None, block=None)>

在这里插入图片描述

1.3 展示前25张图片和图片名称

train_images = train_images / 255.0;
test_images = test_images / 255.0;plt.figure(figsize=(10, 10))
class_names = ['T-shirt/top','Trouser','Pullover','Dress','Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
print("train_labels ", train_labels[:25])
for i in range(25):plt.subplot(5, 5, i+1)plt.xticks([])plt.yticks([])plt.grid(False)plt.imshow(train_images[i], cmap=plt.cm.binary)plt.xlabel(class_names[train_labels[i]])
plt.show()
train_labels  [9 0 0 3 0 2 7 2 5 5 0 9 5 5 7 9 1 0 6 4 3 1 4 8 4]

在这里插入图片描述

2. 模型实现

2.1模型定义

#定义模型
model = keras.Sequential([keras.layers.Flatten(input_shape=(28,28)),keras.layers.Dense(128, activation="relu"),keras.layers.Dense(10, activation="softmax")
])
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=['accuracy'])
model.fit(train_images, train_labels, epochs=10)
D:\python\Lib\site-packages\keras\src\layers\reshaping\flatten.py:37: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.super().__init__(**kwargs)Epoch 1/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 977us/step - accuracy: 0.0967 - loss: 2.3028
Epoch 2/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.0991 - loss: 2.3027
Epoch 3/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.0956 - loss: 2.3028
Epoch 4/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.0987 - loss: 2.3027
Epoch 5/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 968us/step - accuracy: 0.0988 - loss: 2.3028
Epoch 6/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.1009 - loss: 2.3027
Epoch 7/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.0998 - loss: 2.3027
Epoch 8/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.0968 - loss: 2.3028
Epoch 9/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 1ms/step - accuracy: 0.1036 - loss: 2.3027
Epoch 10/10
[1m1875/1875[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m2s[0m 987us/step - accuracy: 0.0973 - loss: 2.3028<keras.src.callbacks.history.History at 0x20049c207d0>

2.2模型评估测试

#评估测试
test_loss, test_accuracy = model.evaluate(test_images, test_labels, verbose=2)
print("test_loss ", test_loss)
print("test_accuracy", test_accuracy)
313/313 - 0s - 892us/step - accuracy: 0.1000 - loss: 2.3026
test_loss  2.3026490211486816
test_accuracy 0.10000000149011612

2.3模型预测

predict_result = model.predict(test_images)
print("predict_result shape, 样本数,每个样本对每个分类的得分 ", predict_result.shape)
print("样本1的每个分类得分, ", predict_result[0])
sample_one_result = np.argmax(predict_result[0])
print("样本1的分类结果%d %s"%(sample_one_result,class_names[sample_one_result]))
print("样本1的真实分类结果%d %s"%(test_labels[0],class_names[test_labels[0]]))
[1m313/313[0m [32m━━━━━━━━━━━━━━━━━━━━[0m[37m[0m [1m0s[0m 671us/step
predict_result shape, 样本数,每个样本对每个分类的得分  (10000, 10)
样本1的每个分类得分,  [0.10038214 0.09719477 0.10009037 0.10101561 0.09946147 0.101658510.10063848 0.09979857 0.09982409 0.09993599]
样本1的分类结果5 Sandal
样本1的真实分类结果9 Ankle boot

2.4 查看指定测试图片的预测结果

#画指定索引位置的图
def plot_image(index, predict_classes, true_labels, images):true_label = true_labels[index]image = images[index]plt.grid(False)plt.xticks([])plt.yticks([])plt.imshow(image, cmap=plt.cm.binary)predict_label = np.argmax(predict_classes)if predict_label == true_label:color = 'blue'else:color = 'red'plt.xlabel("{} {:2.0f}%({})".format(class_names[predict_label],100 * np.max(predict_classes),class_names[true_label]), color=color)
# 画指定样本的对所有分类的预测得分    
def plot_predict_classes(i, predict_classes, true_labels):true_label = train_labels[i]plt.grid(False)plt.xticks(range(10))plt.yticks([])current_plot = plt.bar(range(10), predict_classes, color="#777777")plt.ylim([0,1])predict_label = np.argmax(predict_classes)current_plot[predict_label].set_color("red")current_plot[true_label].set_color('blue')# 画第一个样本的图,和对每个分类的得分
i = 0
plt.figure(figsize=(6,3))
plt.subplot(1,2,1)
plot_image(i, predict_result[i], test_labels, test_images)
plt.subplot(1,2,2)
plot_predict_classes(i, predict_result[i], test_labels)
plt.show()

在这里插入图片描述

3.保存训练的模型

3.1保存模型

# 保存模型
model.save('fashion_model.h5')
WARNING:absl:You are saving your model as an HDF5 file via `model.save()` or `keras.saving.save_model(model)`. This file format is considered legacy. We recommend using instead the native Keras format, e.g. `model.save('my_model.keras')` or `keras.saving.save_model(model, 'my_model.keras')`. 

3.2保存模型到json文件

#查看模型
model_json = model.to_json()
print("model json: ", model_json)#保存json到文件中
with open('fashion_model_config.json', 'w') as json:json.write(model_json)#从json文件中加载模型
print("json from model")
json_model = keras.models.model_from_json(model_json)
json_model.summary()
model json:  {"module": "keras", "class_name": "Sequential", "config": {"name": "sequential", "trainable": true, "dtype": {"module": "keras", "class_name": "DTypePolicy", "config": {"name": "float32"}, "registered_name": null}, "layers": [{"module": "keras.layers", "class_name": "InputLayer", "config": {"batch_shape": [null, 28, 28], "dtype": "float32", "sparse": false, "name": "input_layer"}, "registered_name": null}, {"module": "keras.layers", "class_name": "Flatten", "config": {"name": "flatten", "trainable": true, "dtype": {"module": "keras", "class_name": "DTypePolicy", "config": {"name": "float32"}, "registered_name": null}, "data_format": "channels_last"}, "registered_name": null, "build_config": {"input_shape": [null, 28, 28]}}, {"module": "keras.layers", "class_name": "Dense", "config": {"name": "dense", "trainable": true, "dtype": {"module": "keras", "class_name": "DTypePolicy", "config": {"name": "float32"}, "registered_name": null}, "units": 128, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 784]}}, {"module": "keras.layers", "class_name": "Dense", "config": {"name": "dense_1", "trainable": true, "dtype": {"module": "keras", "class_name": "DTypePolicy", "config": {"name": "float32"}, "registered_name": null}, "units": 10, "activation": "softmax", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 128]}}], "build_input_shape": [null, 28, 28]}, "registered_name": null, "build_config": {"input_shape": [null, 28, 28]}, "compile_config": {"loss": "sparse_categorical_crossentropy", "loss_weights": null, "metrics": ["accuracy"], "weighted_metrics": null, "run_eagerly": false, "steps_per_execution": 1, "jit_compile": false}}
json from model
Model: "sequential"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Layer (type)                         ┃ Output Shape                ┃         Param # ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ flatten (Flatten)                    │ (None, 784)                 │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ dense (Dense)                        │ (None, 128)                 │         100,480 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ dense_1 (Dense)                      │ (None, 10)                  │           1,290 │
└──────────────────────────────────────┴─────────────────────────────┴─────────────────┘
 Total params: 203,542 (795.09 KB)
 Trainable params: 101,770 (397.54 KB)
 Non-trainable params: 0 (0.00 B)
 Optimizer params: 101,772 (397.55 KB)

3.3 保存模型权重到文件

weights = model.get_weights()
print("weight ", weights)
model.save_weights('fashion.weights.h5')
model.load_weights('fashion.weights.h5')
print("weight from file", model.get_weights())
weight  [array([[-0.06041221, -0.03045469, -0.06056997, ...,  0.06603239,-0.06018624, -0.02584767],[-0.06430402, -0.07436118, -0.00909608, ..., -0.04476351,-0.01347907,  0.00300767],[ 0.07909157, -0.0689464 ,  0.07742291, ..., -0.00037885,-0.02884226,  0.05017615],...,[-0.00013881,  0.0794938 ,  0.00120725, ..., -0.00251798,-0.06103022, -0.05509381],[ 0.04131137, -0.0285325 ,  0.06929631, ...,  0.07573903,0.02105945, -0.0524031 ],[ 0.07209501, -0.05137011, -0.07911879, ...,  0.02135488,0.0670035 ,  0.02766179]], dtype=float32), array([-0.00600429, -0.00547086, -0.00584014, -0.00600401, -0.00600361,-0.00565217, -0.00043141, -0.00599924, -0.00380762, -0.00364303,-0.00600468, -0.00330669, -0.00374643, -0.00600456, -0.0060048 ,-0.00600465, -0.0060041 , -0.00696887, -0.0011937 , -0.00599459,-0.00600372, -0.00600169, -0.00512277, -0.00579378, -0.00599535,-0.00598798, -0.00369858, -0.00600331, -0.00596425, -0.00598993,-0.00331114, -0.00600269, -0.00648344, -0.00598456, -0.00600508,-0.0050234 , -0.00600506, -0.00600394, -0.00370826, -0.00600255,-0.00318562, -0.0008926 , -0.00600376, -0.00600392, -0.00600293,-0.0010591 , -0.00526909, -0.0044194 , -0.0060979 , -0.00359087,-0.00599469, -0.00600368, -0.00600309, -0.00600125, -0.0060042 ,-0.0060032 , -0.00277885, -0.00599926, -0.00199332, -0.00494259,-0.00267067, -0.00600501, -0.0060036 , -0.00600471, -0.0060045 ,-0.00259782, -0.0027171 , -0.0060039 , -0.00141335, -0.00366305,-0.00254625, -0.00596222, -0.00328439, -0.00600358, -0.00597709,-0.00600401, -0.00600445, -0.00635821, -0.00166575, -0.00600483,-0.00459235, -0.00600466, -0.00637798, -0.00588632, -0.00599989,-0.0034114 , -0.00600291, -0.00600177, -0.00640314, -0.00600435,-0.00600042, -0.00600292, -0.00600482, -0.00600426, -0.00473085,-0.00157892, -0.00600219, -0.00364143, -0.00600267, -0.00600363,-0.00281488, -0.00600338, -0.00600482, -0.0025767 , -0.00744624,-0.00600235, -0.0060039 , -0.00600472, -0.00109048, -0.00483145,-0.00587764, -0.00600309, -0.00598578, -0.00599881, -0.00370371,-0.00600146, -0.00597422, -0.00600465, -0.00600461, -0.0060043 ,-0.00600423, -0.00243223, -0.00600425, -0.00600203, -0.0045927 ,-0.00371987, -0.00176624, -0.00600512], dtype=float32), array([[ 0.03556623,  0.1688491 , -0.10362723, ...,  0.13207223,-0.06696159, -0.15404737],[ 0.08589712,  0.0726881 , -0.03621184, ..., -0.13316402,-0.11030427, -0.07204279],[-0.02775251,  0.12212092,  0.12542443, ...,  0.05409406,0.07715587,  0.12737972],...,[-0.12100082, -0.0844327 ,  0.03725254, ...,  0.04297927,-0.06126365, -0.04448495],[ 0.00898614,  0.11527378, -0.10356722, ..., -0.09458876,-0.02348839,  0.11287841],[-0.14625832, -0.17126669, -0.0226883 , ..., -0.1290805 ,0.1703024 ,  0.10214148]], dtype=float32), array([ 0.00133452, -0.03093298, -0.00157637,  0.0076253 , -0.00787955,0.0139694 ,  0.0038848 , -0.004496  , -0.00424037, -0.00311988],dtype=float32)]
weight from file [array([[-0.06041221, -0.03045469, -0.06056997, ...,  0.06603239,-0.06018624, -0.02584767],[-0.06430402, -0.07436118, -0.00909608, ..., -0.04476351,-0.01347907,  0.00300767],[ 0.07909157, -0.0689464 ,  0.07742291, ..., -0.00037885,-0.02884226,  0.05017615],...,[-0.00013881,  0.0794938 ,  0.00120725, ..., -0.00251798,-0.06103022, -0.05509381],[ 0.04131137, -0.0285325 ,  0.06929631, ...,  0.07573903,0.02105945, -0.0524031 ],[ 0.07209501, -0.05137011, -0.07911879, ...,  0.02135488,0.0670035 ,  0.02766179]], dtype=float32), array([-0.00600429, -0.00547086, -0.00584014, -0.00600401, -0.00600361,-0.00565217, -0.00043141, -0.00599924, -0.00380762, -0.00364303,-0.00600468, -0.00330669, -0.00374643, -0.00600456, -0.0060048 ,-0.00600465, -0.0060041 , -0.00696887, -0.0011937 , -0.00599459,-0.00600372, -0.00600169, -0.00512277, -0.00579378, -0.00599535,-0.00598798, -0.00369858, -0.00600331, -0.00596425, -0.00598993,-0.00331114, -0.00600269, -0.00648344, -0.00598456, -0.00600508,-0.0050234 , -0.00600506, -0.00600394, -0.00370826, -0.00600255,-0.00318562, -0.0008926 , -0.00600376, -0.00600392, -0.00600293,-0.0010591 , -0.00526909, -0.0044194 , -0.0060979 , -0.00359087,-0.00599469, -0.00600368, -0.00600309, -0.00600125, -0.0060042 ,-0.0060032 , -0.00277885, -0.00599926, -0.00199332, -0.00494259,-0.00267067, -0.00600501, -0.0060036 , -0.00600471, -0.0060045 ,-0.00259782, -0.0027171 , -0.0060039 , -0.00141335, -0.00366305,-0.00254625, -0.00596222, -0.00328439, -0.00600358, -0.00597709,-0.00600401, -0.00600445, -0.00635821, -0.00166575, -0.00600483,-0.00459235, -0.00600466, -0.00637798, -0.00588632, -0.00599989,-0.0034114 , -0.00600291, -0.00600177, -0.00640314, -0.00600435,-0.00600042, -0.00600292, -0.00600482, -0.00600426, -0.00473085,-0.00157892, -0.00600219, -0.00364143, -0.00600267, -0.00600363,-0.00281488, -0.00600338, -0.00600482, -0.0025767 , -0.00744624,-0.00600235, -0.0060039 , -0.00600472, -0.00109048, -0.00483145,-0.00587764, -0.00600309, -0.00598578, -0.00599881, -0.00370371,-0.00600146, -0.00597422, -0.00600465, -0.00600461, -0.0060043 ,-0.00600423, -0.00243223, -0.00600425, -0.00600203, -0.0045927 ,-0.00371987, -0.00176624, -0.00600512], dtype=float32), array([[ 0.03556623,  0.1688491 , -0.10362723, ...,  0.13207223,-0.06696159, -0.15404737],[ 0.08589712,  0.0726881 , -0.03621184, ..., -0.13316402,-0.11030427, -0.07204279],[-0.02775251,  0.12212092,  0.12542443, ...,  0.05409406,0.07715587,  0.12737972],...,[-0.12100082, -0.0844327 ,  0.03725254, ...,  0.04297927,-0.06126365, -0.04448495],[ 0.00898614,  0.11527378, -0.10356722, ..., -0.09458876,-0.02348839,  0.11287841],[-0.14625832, -0.17126669, -0.0226883 , ..., -0.1290805 ,0.1703024 ,  0.10214148]], dtype=float32), array([ 0.00133452, -0.03093298, -0.00157637,  0.0076253 , -0.00787955,0.0139694 ,  0.0038848 , -0.004496  , -0.00424037, -0.00311988],dtype=float32)]

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/142144.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

C++广义表的介绍及创建方法-附C语言实现代码

1. 简介 数组可以存储不允许再分割的数据元素&#xff0c;如字符’X’&#xff0c;数字11&#xff0c;当然它也可以存储数组&#xff0c;二维数组就是一个例子&#xff0c;你可以理解二维数组的每一行的元素是一列中的对应元素的组合。 广义表是一种线性表&#xff0c;或者说…

JVM HotSpot 虚拟机: 对象的创建, 内存布局和访问定位

目录 前言 对象的创建 对象的内存布局 对象的访问定位 前言 了解JVM的内存区域划分之后, 也大致了解了java程序的内存分布模型, 也了解它里面的内存区域里面的类型和各个类型的作用, 接下来我们进一步从对象创建到访问的角度, 来看看这些内存区域之间是怎么关联起来的. …

2023高教社杯全国大学生数学建模竞赛C题 Python代码演示

目录 问题一1.1 蔬菜类商品不同品类或不同单品之间可能存在一定的关联关系&#xff0c;请分析蔬菜各品类及单品销售量的分布规律及相互关系。数据预处理数据合并提取年、月、日信息对蔬菜的各品类按月求销量均值 季节性时间序列分解STL分解加法分解乘法分解 ARIMALSTM import p…

什么是代理IP_如何建立代理IP池?

什么是代理IP_如何建立代理IP池&#xff1f; 1. 概述1.1 什么是代理IP&#xff1f;1.2 代理IP的工作原理1.3 爬虫的应用场景1.3.1 搜索引擎&#xff0c;最大的爬虫1.3.2 数据采集&#xff0c;市场分析利器1.3.3 舆情监控&#xff0c;品牌营销手段1.3.4 价格监测&#xff0c;全网…

时序差分法

一、时序差分法 时序差分是一种用来估计一个策略的价值函数的方法&#xff0c;它结合了蒙特卡洛和动态规划算法的思想。时序差分方法和蒙特卡洛的相似之处在于可以从样本数据中学习&#xff0c;不需要事先知道环境&#xff1b;和动态 规划的相似之处在于根据贝尔曼方程的思想&…

外网(公网)访问VMware workstation 虚拟机内web网站的配置方法---端口转发总是不成功的原因

问题背景&#xff1a;客户提供的服务器操作系统配置web程序时&#xff0c;总是显示莫名其妙的问题&#xff0c;发现是高版本操作系统的.net库已经对低版本.net库进行了大范围修订&#xff0c;导致在安全检测上、软件代码规范上更加苛刻&#xff0c;最终导致部署不成功。于是想到…

【C++】入门基础(下)

Hi&#xff01;很高兴见到你~ 目录 7、引用 7.3 引用的使用&#xff08;实例&#xff09; 7.4 const引用 【第一分点】 【第二分点1】 【第二分点2】 7.5 指针和引用的关系&#xff08;面试点&#xff09; 8、inline 9、nullptr Relaxing Time&#xff01; ———…

基于VUE的老年颐养中心系统的设计与实现计算机毕业论文

根据联合国的预测&#xff0c;2000-2050年将是我国人口年龄结构急剧老化的阶段&#xff0c;老化过程大致也可分为三个阶段&#xff1a;第一阶段&#xff0c;65岁及以上人口比例从2000年的6.97%上升到2020年的11.7%&#xff0c;20年时间仅上升4.63个百分点。第二阶段为2020-2040…

蓝桥杯省赛真题——大臣的旅费

输入样例&#xff1a; 5 1 2 2 1 3 1 2 4 5 2 5 4 输出样例&#xff1a; 135分析&#xff1a; 本题实际上要求我们去求在图中最远两点之间的距离&#xff0c;也就是树的直径 我们先从某一个点出发&#xff0c;到达离其最远的点&#xff0c;然后再重复操作一次即可 #inclu…

钢轨缺陷检测-目标检测数据集(包括VOC格式、YOLO格式)

钢轨缺陷检测-目标检测数据集&#xff08;包括VOC格式、YOLO格式&#xff09; 数据集&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1h7Dc0MiiRgtd7524cBUOFQ?pwdfr9y 提取码&#xff1a;fr9y 数据集信息介绍&#xff1a; 共有 1493 张图像和一一对应的标注文件 标…

【二叉树进阶】二叉搜索树

目录 1. 二叉搜索树概念 2. 二叉搜索树的实现 2.1 创建二叉搜索树节点 2.2 创建实现二叉搜索树 2.3 二叉搜索树的查找 2.4 二叉搜索树的插入 2.5 二叉搜索树的删除 2.6 中序遍历 2.7 完整代码加测试 3. 二叉搜索树的应用 3.1 K模型&#xff1a; 3.2 KV模型&#xf…

数据技术革命来袭!从仓库到飞轮,企业数字化的终极进化!

文章目录 数据仓库&#xff1a;信息化的基石数据中台&#xff1a;数字化转型的加速器数据飞轮&#xff1a;智能化的新纪元技术演进的驱动力 自20世纪80年代末数据仓库问世以来&#xff0c;它迅速成为企业数据管理的核心。作为一名大数据工程师&#xff0c;我深刻体会到数据仓库…

k8s使用本地docker私服启动自制的flink集群

目标&#xff1a;使用本地flink环境自制flink镜像包上传到本地的私服&#xff0c;然后k8s使用本地的私服拉取镜像启动Flink集群 1、将本地的flink软件包打包成Docker镜像 从官网下载flink-1.13.6的安装包&#xff0c;修改其中的flink-conf.yaml&#xff0c;修改下面几项配置 …

Mistral AI再创新高,Pixtral 12B多模态模型强势来袭

前沿科技速递&#x1f680; 近日&#xff0c;Mistral AI 发布了其首款多模态大模型——Pixtral 12B。作为一款具有语言与视觉处理能力的模型&#xff0c;Pixtral 12B 支持高达10241024像素的图像&#xff0c;具备强大的文本生成、图像理解与生成能力&#xff0c;能够处理复杂的…

热成像目标检测数据集

热成像目标检测数据集 V2 版本 项目背景 热成像技术因其在安防监控、夜间巡逻、消防救援等领域的独特优势而受到重视。本数据集旨在提供高质量的热成像图像及其对应的可见光图像&#xff0c;支持热成像目标检测的研究与应用。 数据集概述 名称&#xff1a;热成像目标检测数据…

Kafka日志索引详解与常见问题分析

目录 一、Kafka的Log日志梳理 1、Topic下的消息是如何存储的&#xff1f; 1. log文件追加记录所有消息 2. index和timeindex加速读取log消息日志 2、文件清理机制 1. 如何判断哪些日志文件过期了 2. 过期的日志文件如何处理 3、Kafka的文件高效读写机制 1. Kafka的文件…

图神经网络模型扩展(5)--2

1.图的无监督学习 在数据爆炸的时代&#xff0c;大部分数据都是没有标签的。为了将它们应用到深度学习模型上&#xff0c;需要大量的人力来标注数据&#xff0c;例如我们熟知的人脸识别项目&#xff0c;如果想取得更好的识别效果&#xff0c;则一定需要大量人工标注的人脸数据。…

Android MediaPlayer + GLSurfaceView 播放视频

Android使用OpenGL 播放视频 概述TextureView的优缺点OpenGL的优缺点 实现复杂图形效果的场景参考 概述 在Android开发中&#xff0c;使用OpenGL ES来渲染视频是一种常见的需求&#xff0c;尤其是在需要实现自定义的视频播放界面或者视频特效时。结合MediaPlayer&#xff0c;我…

【论文阅读】BC-Z: Zero-Shot Task Generalization with Robotic Imitation Learning

Abstract 在这篇论文中&#xff0c;我们研究了使基于视觉的机器人操纵系统能够泛化到新任务的问题&#xff0c;这是机器人学习中的一个长期挑战。我们从模仿学习的角度来应对这一挑战&#xff0c;旨在研究如何扩展和扩大收集的数据来促进这种泛化。为此&#xff0c;我们开发了…

数据库之索引<保姆级文章>

目录&#xff1a; 一. 什么是索引 二. 索引应该选择哪种数据结构 三. MySQL中的页 四. 索引分类及使用 一. 什么是索引&#xff1a; 1. MySQL的索引是⼀种数据结构&#xff0c;它可以帮助数据库高效地查询、更新数据表中的数据。 索引通过 ⼀定的规则排列数据表中的记录&#x…