Automobile history

本文讲述了汽车历史上的一个重要时刻:1769年,法国工程师尼古拉斯·约瑟夫·库格诺发明了世界上第一辆自行驱动的道路车辆。这是一台由蒸汽机驱动的军事用拖拉机,为现代汽车的发展奠定了基础。

The history of the automobile reflects an evolution that took place worldwide. It is estimated that over 100,000 patents created the modern automobile. However, we can point to the many firsts that occurred along the way. Starting with the first theoretical plans for a motor vehicle that had been drawn up by both Leonardo da Vinci and Isaac Newton.

In 1769, the very first self-propelled road vehicle was a military tractor invented by French engineer and mechanic, Nicolas Joseph Cugnot (1725 - 1804). Cugnot used a steam engine to power his vehicle, built under his instructions at the Paris Arsenal by mechanic Brezin. It was used by the French Army to haul artillery at a whopping speed of 2 1/2 mph on only three wheels. The vehicle had to stop every ten to fifteen minutes to build up steam power. The steam engine and boiler were separate from the rest of the vehicle and placed in the front (see engraving above). The following year (1770), Cugnot built a steam-powered tricycle that carried four passengers.

In 1771, Cugnot drove one of his road vehicles into a stone wall, making Cugnot the first person to get into a motor vehicle accident. This was the beginning of bad luck for the inventor. After one of Cugnot's patrons died and the other was exiled, the money for Cugnot's road vehicle experiments ended.

Steam engines powered cars by burning fuel that heated water in a boiler, creating steam that expanded and pushed pistons that turned the crankshaft, which then turned the wheels. During the early history of self-propelled vehicles - both road and railroad vehicles were being developed with steam engines. (Cugnot also designed two steam locomotives with engines that never worked well.) Steam engines added so much weight to a vehicle that they proved a poor design for road vehicles; however, steam engines were very successfully used in locomotives. Historians, who accept that early steam-powered road vehicles were automobiles, feel that Nicolas Cugnot was the inventor of the first automobile.   

import tensorflow as tf from tensorflow.keras import layers, models, datasets import matplotlib.pyplot as plt # 1. 数据加载和预处理 (train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data(). # 归一化像素值到0-1范围 train_images, test_images = train_images / 255.0, test_images / 255.0. # 类别名称(CIFAR-10数据集) class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']. # 2. 构建CNN模型(按照图示结构) model = models.Sequential([ # 输入层:32x32 RGB图像 # 第一卷积层(Conv2D) layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)), # 第一池化层(MaxPooling) layers.MaxPooling2D((2, 2)), # 第二卷积层 layers.Conv2D(64, (3, 3), activation='relu'), # 第二池化层 layers.MaxPooling2D((2, 2)), # 第三卷积层 layers.Conv2D(64, (3, 3), activation='relu'), # 展平层(将3D特征图转换为1D向量) layers.Flatten(), # 全连接层(Dense) layers.Dense(64, activation='relu'), # 输出层(10个类别的概率分布) layers.Dense(10, activation='softmax') ]) # 3. 编译模型 model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) # 4. 训练模型 history = model.fit(train_images, train_labels, epochs=10, validation_data=(test_images, test_labels)) # 5. 评估模型 # 绘制训练曲线 plt.figure(figsize=(12, 4)) plt.subplot(1, 2, 1) plt.plot(history.history['accuracy'], label='Training Accuracy') plt.plot(history.history['val_accuracy'], label='Validation Accuracy') plt.xlabel('Epoch') plt.ylabel('Accuracy') plt.legend() plt.subplot(1, 2, 2) plt.plot(history.history['loss'], label='Training Loss') plt.plot(history.history['val_loss'], label='Validation Loss') plt.xlabel('Epoch') plt.ylabel('Loss') plt.legend() plt.show() # 测试集评估 test_loss, test_acc = model.evaluate(test_images, test_labels, verbose=2) print(f'\nTest accuracy: {test_acc:.4f}') # 6. 使用模型进行预测 def predict_image(img_array, model=model): """预测单张图像的类别""" img_array = tf.expand_dims(img_array, 0) # 添加batch维度 predictions = model.predict(img_array) predicted_class = tf.argmax(predictions[0]).numpy() confidence = tf.reduce_max(predictions[0]).numpy() return predicted_class, confidence # 示例预测 sample_image = test_images[0] pred_class, confidence = predict_image(sample_image) print(f"\nExample prediction:") print(f"Predicted class: {class_names[pred_class]} (confidence: {confidence:.2%})") print(f"Actual class: {class_names[test_labels[0][0]]}")
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值