T9打卡学习笔记

news2024/11/15 4:24:55
  • 🍨 本文为🔗365天深度学习训练营 中的学习记录博客
  • 🍖 原作者:K同学啊
import tensorflow as tf

gpus = tf.config.list_physical_devices("GPU")

if gpus:
    tf.config.experimental.set_memory_growth(gpus[0], True)  #设置GPU显存用量按需使用
    tf.config.set_visible_devices([gpus[0]],"GPU")

# 打印显卡信息,确认GPU可用
print(gpus)
[]
import numpy as np
import matplotlib.pyplot as plt
# 支持中文
plt.rcParams['font.sans-serif'] = ['SimHei']  # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号

import os,PIL,pathlib

#隐藏警告
import warnings
warnings.filterwarnings('ignore')

data_dir = r"C:\Users\11054\Desktop\kLearning\t9_learning\data"
data_dir = pathlib.Path(data_dir)

image_count = len(list(data_dir.glob('*/*')))

print("图片总数为:",image_count)
图片总数为: 3400
batch_size = 64
img_height = 224
img_width  = 224
"""
关于image_dataset_from_directory()的详细介绍可以参考文章:https://mtyjkh.blog.csdn.net/article/details/117018789
"""
train_ds = tf.keras.preprocessing.image_dataset_from_directory(
    data_dir,
    validation_split=0.2,
    subset="training",
    seed=12,
    image_size=(img_height, img_width),
    batch_size=batch_size)

"""
关于image_dataset_from_directory()的详细介绍可以参考文章:https://mtyjkh.blog.csdn.net/article/details/117018789
"""
val_ds = tf.keras.preprocessing.image_dataset_from_directory(
    data_dir,
    validation_split=0.2,
    subset="validation",
    seed=12,
    image_size=(img_height, img_width),
    batch_size=batch_size)

class_names = train_ds.class_names
print(class_names)
Found 3400 files belonging to 2 classes.
Using 2720 files for training.
Found 3400 files belonging to 2 classes.
Using 680 files for validation.
['cat', 'dog']
for image_batch, labels_batch in train_ds:
    print(image_batch.shape)
    print(labels_batch.shape)
    break
(64, 224, 224, 3)
(64,)
AUTOTUNE = tf.data.AUTOTUNE

def preprocess_image(image,label):
    return (image/255.0,label)

# 归一化处理
train_ds = train_ds.map(preprocess_image, num_parallel_calls=AUTOTUNE)
val_ds   = val_ds.map(preprocess_image, num_parallel_calls=AUTOTUNE)

train_ds = train_ds.cache().shuffle(1000).prefetch(buffer_size=AUTOTUNE)
val_ds   = val_ds.cache().prefetch(buffer_size=AUTOTUNE)
#可视化数据
plt.figure(figsize=(15, 10))  # 图形的宽为15高为10

for images, labels in train_ds.take(1):
    for i in range(8):

        ax = plt.subplot(5, 8, i + 1)
        plt.imshow(images[i])
        plt.title(class_names[labels[i]])

        plt.axis("off")

在这里插入图片描述

构建VGG-16

  1. VGG优缺点
  • VGG优点
    VGG的结构非常简洁,整个网络都使用了同样大小的卷积核尺寸(3x3)和最大池化尺寸(2x2)
  • VGG缺点
    1)训练时间过长,调参难度大。2)需要的存储容量大,不利于部署。例如存储VGG-16权重值文件的大小为500多MB,不利于安装到嵌入式系统中
  1. 全连接层作用
  • 主要作用是将输入的特征组合起来,以形成新的特征表示。在卷积神经网络(CNN)中,全连接层通常位于卷积层和池化层之后,用于将局部的特征组合成全局的特征表示。
  • 通过在全连接层之后应用激活函数(如ReLU, Sigmoid, Tanh等),可以引入非线性变换,使模型能够拟合复杂的非线性关系。
  • 全连接层包含大量的可训练参数(权重和偏置)。这些参数通过反向传播算法进行学习和优化,以最小化损失函数
  • 分类问题中全连接层的输出通常会通过一个 Softmax 层(多分类)或 Sigmoid 层(二分类)转换成类别概率,从而完成最终的分类决策。
  • 全连接层的每一个神经元与前一层的所有神经元相连接,将输入向量转换为输出向量,确保模型的输入和输出维度匹配。
from tensorflow.keras import layers, models, Input
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Dense, Flatten, Dropout

def VGG16(nb_classes, input_shape):
    input_tensor = Input(shape=input_shape)
    # 1st block
    x = Conv2D(64, (3,3), activation='relu', padding='same',name='block1_conv1')(input_tensor)
    x = Conv2D(64, (3,3), activation='relu', padding='same',name='block1_conv2')(x)
    x = MaxPooling2D((2,2), strides=(2,2), name = 'block1_pool')(x)
    # 2nd block
    x = Conv2D(128, (3,3), activation='relu', padding='same',name='block2_conv1')(x)
    x = Conv2D(128, (3,3), activation='relu', padding='same',name='block2_conv2')(x)
    x = MaxPooling2D((2,2), strides=(2,2), name = 'block2_pool')(x)
    # 3rd block
    x = Conv2D(256, (3,3), activation='relu', padding='same',name='block3_conv1')(x)
    x = Conv2D(256, (3,3), activation='relu', padding='same',name='block3_conv2')(x)
    x = Conv2D(256, (3,3), activation='relu', padding='same',name='block3_conv3')(x)
    x = MaxPooling2D((2,2), strides=(2,2), name = 'block3_pool')(x)
    # 4th block
    x = Conv2D(512, (3,3), activation='relu', padding='same',name='block4_conv1')(x)
    x = Conv2D(512, (3,3), activation='relu', padding='same',name='block4_conv2')(x)
    x = Conv2D(512, (3,3), activation='relu', padding='same',name='block4_conv3')(x)
    x = MaxPooling2D((2,2), strides=(2,2), name = 'block4_pool')(x)
    # 5th block
    x = Conv2D(512, (3,3), activation='relu', padding='same',name='block5_conv1')(x)
    x = Conv2D(512, (3,3), activation='relu', padding='same',name='block5_conv2')(x)
    x = Conv2D(512, (3,3), activation='relu', padding='same',name='block5_conv3')(x)
    x = MaxPooling2D((2,2), strides=(2,2), name = 'block5_pool')(x)
    # full connection
    x = Flatten()(x)
    x = Dense(4096, activation='relu',  name='fc1')(x)
    x = Dense(4096, activation='relu', name='fc2')(x)
    output_tensor = Dense(nb_classes, activation='softmax', name='predictions')(x)

    model = Model(input_tensor, output_tensor)
    return model

model=VGG16(1000, (img_width, img_height, 3))
model.summary()
Model: "functional"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Layer (type)                         ┃ Output Shape                ┃         Param # ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ input_layer (InputLayer)             │ (None, 224, 224, 3)         │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block1_conv1 (Conv2D)                │ (None, 224, 224, 64)        │           1,792 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block1_conv2 (Conv2D)                │ (None, 224, 224, 64)        │          36,928 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block1_pool (MaxPooling2D)           │ (None, 112, 112, 64)        │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block2_conv1 (Conv2D)                │ (None, 112, 112, 128)       │          73,856 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block2_conv2 (Conv2D)                │ (None, 112, 112, 128)       │         147,584 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block2_pool (MaxPooling2D)           │ (None, 56, 56, 128)         │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block3_conv1 (Conv2D)                │ (None, 56, 56, 256)         │         295,168 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block3_conv2 (Conv2D)                │ (None, 56, 56, 256)         │         590,080 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block3_conv3 (Conv2D)                │ (None, 56, 56, 256)         │         590,080 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block3_pool (MaxPooling2D)           │ (None, 28, 28, 256)         │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block4_conv1 (Conv2D)                │ (None, 28, 28, 512)         │       1,180,160 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block4_conv2 (Conv2D)                │ (None, 28, 28, 512)         │       2,359,808 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block4_conv3 (Conv2D)                │ (None, 28, 28, 512)         │       2,359,808 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block4_pool (MaxPooling2D)           │ (None, 14, 14, 512)         │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block5_conv1 (Conv2D)                │ (None, 14, 14, 512)         │       2,359,808 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block5_conv2 (Conv2D)                │ (None, 14, 14, 512)         │       2,359,808 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block5_conv3 (Conv2D)                │ (None, 14, 14, 512)         │       2,359,808 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ block5_pool (MaxPooling2D)           │ (None, 7, 7, 512)           │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ flatten (Flatten)                    │ (None, 25088)               │               0 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ fc1 (Dense)                          │ (None, 4096)                │     102,764,544 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ fc2 (Dense)                          │ (None, 4096)                │      16,781,312 │
├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤
│ predictions (Dense)                  │ (None, 1000)                │       4,097,000 │
└──────────────────────────────────────┴─────────────────────────────┴─────────────────┘
 Total params: 138,357,544 (527.79 MB)
 Trainable params: 138,357,544 (527.79 MB)
 Non-trainable params: 0 (0.00 B)
# 模型编译与运行
initial_learning_rate = 0.01
lr_schedule = tf.keras.optimizers.schedules.ExponentialDecay(
    initial_learning_rate,
    decay_steps=100000,
    decay_rate=0.92,
    staircase=True)
optimizer = tf.keras.optimizers.Adam(learning_rate=lr_schedule)
model.compile(optimizer=optimizer,
              loss     ='sparse_categorical_crossentropy',
              metrics  =['accuracy'])
from tqdm import tqdm
import tensorflow.keras.backend as K

epochs = 10
lr     = 1e-4

# 记录训练数据,方便后面的分析
history_train_loss     = []
history_train_accuracy = []
history_val_loss       = []
history_val_accuracy   = []

for epoch in range(epochs):
    train_total = len(train_ds)
    val_total   = len(val_ds)

    """
    total:预期的迭代数目
    ncols:控制进度条宽度
    mininterval:进度更新最小间隔,以秒为单位(默认值:0.1)
    """
    with tqdm(total=train_total, desc=f'Epoch {epoch + 1}/{epochs}',mininterval=1,ncols=100) as pbar:
        train_loss     = []
        train_accuracy = []
        for image,label in train_ds:
            """
            训练模型,简单理解train_on_batch就是:它是比model.fit()更高级的一个用法

            想详细了解 train_on_batch 的同学,
            可以看看我的这篇文章:https://www.yuque.com/mingtian-fkmxf/hv4lcq/ztt4gy
            """
             # 这里生成的是每一个batch的acc与loss
            history = model.train_on_batch(image,label)

            train_loss.append(history[0])
            train_accuracy.append(history[1])

            pbar.set_postfix({"train_loss": "%.4f"%history[0],
                              "train_acc":"%.4f"%history[1],
                              "lr": optimizer.learning_rate.numpy()})
            pbar.update(1)

        history_train_loss.append(np.mean(train_loss))
        history_train_accuracy.append(np.mean(train_accuracy))

    print('开始验证!')

    with tqdm(total=val_total, desc=f'Epoch {epoch + 1}/{epochs}',mininterval=0.3,ncols=100) as pbar:

        val_loss     = []
        val_accuracy = []
        for image,label in val_ds:
            # 这里生成的是每一个batch的acc与loss
            history = model.test_on_batch(image,label)

            val_loss.append(history[0])
            val_accuracy.append(history[1])

            pbar.set_postfix({"val_loss": "%.4f"%history[0],
                              "val_acc":"%.4f"%history[1]})
            pbar.update(1)
        history_val_loss.append(np.mean(val_loss))
        history_val_accuracy.append(np.mean(val_accuracy))

    print('结束验证!')
    print("验证loss为:%.4f"%np.mean(val_loss))
    print("验证准确率为:%.4f"%np.mean(val_accuracy))
Epoch 1/10:   7%| | 3/43 [00:58<12:50, 19.26s/it, train_loss=817908992.0000, train_acc=0.4844, lr=0.

WARNING:tensorflow:5 out of the last 5 calls to <function TensorFlowTrainer.make_train_function.<locals>.one_step_on_iterator at 0x0000026D58AB2670> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has reduce_retracing=True option that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for  more details.


Epoch 1/10:   9%| | 4/43 [01:17<12:21, 19.02s/it, train_loss=33623308288.0000, train_acc=0.4844, lr=

WARNING:tensorflow:6 out of the last 6 calls to <function TensorFlowTrainer.make_train_function.<locals>.one_step_on_iterator at 0x0000026D58AB2670> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has reduce_retracing=True option that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for  more details.


Epoch 1/10: 100%|█| 43/43 [13:22<00:00, 18.66s/it, train_loss=3165756416.0000, train_acc=0.4989, lr=


开始验证!


Epoch 1/10:  36%|███▋      | 4/11 [00:19<00:34,  4.88s/it, val_loss=2893433856.0000, val_acc=0.4940]

WARNING:tensorflow:5 out of the last 5 calls to <function TensorFlowTrainer.make_test_function.<locals>.one_step_on_iterator at 0x0000026DDF2E49D0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has reduce_retracing=True option that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for  more details.


Epoch 1/10:  45%|████▌     | 5/11 [00:24<00:29,  4.87s/it, val_loss=2832519680.0000, val_acc=0.4951]

WARNING:tensorflow:6 out of the last 6 calls to <function TensorFlowTrainer.make_test_function.<locals>.one_step_on_iterator at 0x0000026DDF2E49D0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has reduce_retracing=True option that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for  more details.


Epoch 1/10: 100%|█████████| 11/11 [00:51<00:00,  4.70s/it, val_loss=2532606720.0000, val_acc=0.4974]


结束验证!
验证loss为:2787614720.0000
验证准确率为:0.4958


Epoch 2/10: 100%|█| 43/43 [13:03<00:00, 18.23s/it, train_loss=1423662976.0000, train_acc=0.5020, lr=


开始验证!


Epoch 2/10: 100%|█████████| 11/11 [00:52<00:00,  4.74s/it, val_loss=1281297920.0000, val_acc=0.5026]


结束验证!
验证loss为:1341318784.0000
验证准确率为:0.5034


Epoch 3/10: 100%|█| 43/43 [13:02<00:00, 18.19s/it, train_loss=915221888.0000, train_acc=0.5022, lr=0


开始验证!


Epoch 3/10: 100%|██████████| 11/11 [00:52<00:00,  4.75s/it, val_loss=854207104.0000, val_acc=0.5026]


结束验证!
验证loss为:880286656.0000
验证准确率为:0.5031


Epoch 4/10: 100%|█| 43/43 [13:04<00:00, 18.24s/it, train_loss=674374464.0000, train_acc=0.5006, lr=0


开始验证!


Epoch 4/10: 100%|██████████| 11/11 [00:51<00:00,  4.71s/it, val_loss=640655744.0000, val_acc=0.5001]


结束验证!
验证loss为:655163968.0000
验证准确率为:0.4998


Epoch 5/10: 100%|█| 43/43 [13:01<00:00, 18.18s/it, train_loss=533879808.0000, train_acc=0.5004, lr=0


开始验证!


Epoch 5/10: 100%|██████████| 11/11 [00:52<00:00,  4.76s/it, val_loss=512524608.0000, val_acc=0.5007]


结束验证!
验证loss为:521749024.0000
验证准确率为:0.5010


Epoch 6/10: 100%|█| 43/43 [13:05<00:00, 18.28s/it, train_loss=441831552.0000, train_acc=0.4995, lr=0


开始验证!


Epoch 6/10: 100%|██████████| 11/11 [00:52<00:00,  4.75s/it, val_loss=427103840.0000, val_acc=0.4992]


结束验证!
验证loss为:433481824.0000
验证准确率为:0.4990


Epoch 7/10: 100%|█| 43/43 [13:07<00:00, 18.30s/it, train_loss=376856320.0000, train_acc=0.5020, lr=0


开始验证!


Epoch 7/10: 100%|██████████| 11/11 [00:51<00:00,  4.69s/it, val_loss=366089024.0000, val_acc=0.5022]


结束验证!
验证loss为:370760384.0000
验证准确率为:0.5024


Epoch 8/10: 100%|█| 43/43 [13:00<00:00, 18.16s/it, train_loss=328541408.0000, train_acc=0.5014, lr=0


开始验证!


Epoch 8/10: 100%|██████████| 11/11 [00:52<00:00,  4.74s/it, val_loss=320327872.0000, val_acc=0.5015]


结束验证!
验证loss为:323896160.0000
验证准确率为:0.5017


Epoch 9/10: 100%|█| 43/43 [13:07<00:00, 18.30s/it, train_loss=291207168.0000, train_acc=0.5030, lr=0


开始验证!


Epoch 9/10: 100%|██████████| 11/11 [00:52<00:00,  4.74s/it, val_loss=284735904.0000, val_acc=0.5027]


结束验证!
验证loss为:287550240.0000
验证准确率为:0.5026


Epoch 10/10: 100%|█| 43/43 [13:03<00:00, 18.21s/it, train_loss=261492144.0000, train_acc=0.5038, lr=


开始验证!


Epoch 10/10: 100%|█████████| 11/11 [00:52<00:00,  4.75s/it, val_loss=256262304.0000, val_acc=0.5039]

结束验证!
验证loss为:258538656.0000
验证准确率为:0.5041
# 模型评估
epochs_range = range(epochs)

plt.figure(figsize=(14, 4))
plt.subplot(1, 2, 1)

plt.plot(epochs_range, history_train_accuracy, label='Training Accuracy')
plt.plot(epochs_range, history_val_accuracy, label='Validation Accuracy')
plt.legend(loc='lower right')
plt.title('Training and Validation Accuracy')

plt.subplot(1, 2, 2)
plt.plot(epochs_range, history_train_loss, label='Training Loss')
plt.plot(epochs_range, history_val_loss, label='Validation Loss')
plt.legend(loc='upper right')
plt.title('Training and Validation Loss')
plt.show()

在这里插入图片描述

个人总结

  • K.set_value TensorFlow 2.16中已被弃用 可通过tf.keras.optimizers.schedules.ExponentialDecay设置动态学习率
  • K.get_value TensorFlow 2.16中已被弃用 可通过current_lr = optimizer.learning_rate.numpy()获取当前学习率

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

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

相关文章

慢SQL优化的30个思路方案整理

文章目录 &#xff08;1&#xff09;索引优化&#xff08;2&#xff09;查询重构&#xff08;3&#xff09;减少数据扫描量&#xff08;4&#xff09;利用缓存&#xff08;5&#xff09;分区表&#xff08;6&#xff09;优化排序和分组&#xff08;7&#xff09;业务查询条件限…

力扣面试150 基本计算器 双栈模拟

Problem: 224. 基本计算器 &#x1f468;‍&#x1f3eb; 参考题解 Code class Solution {public int calculate(String s) {// 存放所有的数字&#xff0c;用于计算LinkedList<Integer> nums new LinkedList<>();// 为了防止第一个数为负数&#xff0c;先往 nu…

创建stm32f103c8t6基本工程

创建stm32f103c8t6基本工程 (1)桌面空白处,鼠标右键新建文件夹,重命名为工程名字 (2)打开keil5 (3)点击Project-> New uvision project (4)找到我们桌面的刚才新建的文件夹,文件名 , 起自己的工程名字的,不要用空格 , 然后点击保存 (5)选择如下芯片, 然后确定 (6)然后就会弹…

linux的ceph

ceph ceph是一个开源的&#xff0c;用c语言编写的分布式的存储系统。存储文件数据。 分布式由多台物理磁盘组成一个集群&#xff0c;在这个基础之上实现高可用&#xff0c;扩展。 ceph是一个统一的存储系统&#xff0c;同时提供块设备存储&#xff0c;文件系统存储和对象存储…

C++学习笔记05-补充知识点(问题-解答自查版)

前言 以下问题以Q&A形式记录&#xff0c;基本上都是笔者在初学一轮后&#xff0c;掌握不牢或者频繁忘记的点 Q&A的形式有助于学习过程中时刻关注自己的输入与输出关系&#xff0c;也适合做查漏补缺和复盘。 本文对读者可以用作自查&#xff0c;答案在后面&#xff0…

55 华三模拟器Server2 操作

华三模拟器Server2 操作 # /etc/config/dhcp uci set dhcp.eth2dhcp uci set dhcp.eth2.interfaceeth2 uci set dhcp.eth2.start100 uci set dhcp.eth2.limit150 uci set dhcp.eth2.leasetime12h # /etc/config/network uci set network.eth2interface uci set network.eth2.pr…

可爱萌《奥咕和秘密森林》,电脑单机游戏免费分享

《奥咕和秘密森林》是一款2D冒险游戏&#xff0c;游戏中玩家将与奥咕宝宝一起探索一个奇妙的世界。这款游戏的特点包括手绘角色和多种谜题&#xff0c;玩家可以在游戏中与激萌的小动物成为朋友&#xff0c;打败异界怪物&#xff0c;揭开未知世界的秘密。 游戏特色 探索世界&am…

宁德时代社招SHL入职测评:语言理解数字推理测评及综合测评真题、高分攻略、答题技巧

宁德时代的社招入职测评主要采用SHL的Verify系统&#xff0c;测评内容包括语言理解、数字推理、逻辑推理等部分。具体来说&#xff0c;语言理解部分包括阅读理解、逻辑填空和语句排序等题型&#xff0c;要求在限定时间内完成一定数量的题目 。数字推理部分则包括数字序列、数学…

JavaScript 数组排序

JavaScript 提供了多种对数组进行排序的方法&#xff0c;其中最常见和直接的是使用数组的 .sort() 方法。.sort() 方法可以对数组的元素进行排序&#xff0c;并返回排序后的数组。然而&#xff0c;.sort() 方法默认将数组元素转换为字符串&#xff0c;并按照字符串的 Unicode 编…

【Python】数据类型之字典(上)

字典是有序、键不重复且元素只能是键值对的可变的一个容器。 data{"k1":1,"k2":25} data中“k1”和“k2”是键&#xff0c;而1,25是值。“k1”:1,"k2":25是键值对。 1&#xff09;&#xff09;容器&#xff1a;存储多个元素。 2&#xff09;…

2024年港澳台联考高校新一波录取分数线来啦

导读 在前面几次中&#xff0c;我们和大家分享了一些2024年港澳台联考高校最新的录取分数线。今天我们继续来看一批新的录取分数线吧&#xff01;景于行分享的数据基本上都是经过可靠验证的&#xff0c;大家可以放心参考。 上海大学 上海大学和深圳大学是近些年来&#xff0c;依…

haproxy的安装和服务信息

为什么要使用haproxy&#xff1f; 因为LSV无后端检测&#xff0c;当webserver有一台状态异常&#xff0c;则运作异常&#xff1b;所以用haproxy来解决。 haproxy是一款具备高并发(万级以上)、高性能的TCP和HTTP负载均衡器&#xff0c;它支持基于cookie的持久性&#xff0c;自动…

力扣-1两数之和2两数相加-2024/8/3

1、两数之和 解法一 暴力法&#xff08;2个for循环&#xff09; class Solution:def twoSum(self, nums: List[int], target: int) -> List[int]:for ii in range(len(nums)):for jj in range(ii1, len(nums)):if nums[ii]nums[jj] target:return [ii,jj]解法二 哈希表法…

具有并发功能的网页以及一点链表相关内容

最近学习内容&#xff0c;前几天做了个小项目&#xff0c;通过tcp与html构建具有并发功能的商城 具有以下功能&#xff1a; 1 登陆进入查询页面 2 搜索商品信息概述 3 查看商品详细信息 4 记录访客信息 5 注册新用户 主页如下 主页程序 程序的设计&#xff1a;将现实中大…

DELL EMC PowerStore1000T存储添加主机、映射LUN

本次操作是为了把存储的卷映射给VMware集群&#xff0c;存储网络协议为FC SAN&#xff0c;存储端和主机端均连接FC交换机&#xff0c;并且FC交换机已完成ZONE相关配置 具体操作过程如下&#xff1a; 一、DELL EMC PowerStore1000T添加主机 1、进入Web控制台&#xff0c;点击…

字符函数和字符串函数(C语言)

目录 一. 字符分类函数 二. 字符转换函数 三.多种函数的使用和模拟实现 3.1 strlen函数 3.2 strcpy函数 3.3 strcat函数 3.4 strcmp函数 3.5 strncpy strncat strncmp &#x1f35f;&#x1f9e3;结束了指针的学习&#xff0c;我们开始了字符串之旅&#xf…

【若依项目-RuoYi】掌握若依前端的基本流程

搞毕设项目&#xff0c;使用前后端分离技术&#xff0c;后端springBoot&#xff0c;前端vue3element plus。自己已经写好前端与后端代码&#xff0c;但想换一个前端界面所以使用到了若依&#xff0c;前前后后遇到许多坑&#xff0c;记录一下&#xff0c;方便之后能够快速回忆。…

创意指南丨VR游览沉浸式空间体验

欢迎来到我们制作的VR幻想世界。玩家的起点是一条蓝色水晶大道&#xff0c;让我们一起探索这个如梦似幻的境地。 在这条大道的两侧&#xff0c;漂浮着半透明的大水晶水母。它们轻盈地在空中飘动&#xff0c;仿佛在欢迎我们的到来。这条道路上方&#xff0c;一个个半圆环不停地…

人脸身份证比对接口如何用Java对接?(二)

一、什么是人脸身份证比对&#xff1f; 人脸身份证比对又称人证比对&#xff0c;实人比对&#xff0c;人像比对&#xff0c;输入姓名、身份证号码和头像照片&#xff0c;与公安库身份证头像进行权威比对&#xff0c;返回分值作为判断依据。 二、人脸身份证比对接口适用哪些场…

iMovie Tutorial【iMovie 剪辑教程】

文章目录 项目字幕视频截取范围 显示进度条大小播放速度视频图层降噪转场设置转场时间 声音录制声音 分享导出文件 项目 字幕 视频 截取范围 i、o、e 显示进度条大小 播放速度 视频图层 例如&#xff1a;视频衔接、插入表情视频、头像对话 降噪 户外录制视频需要降噪。…