PYTHON+CH341 3线SPI驱动UC1601 LCD实现汉字显示

前言

        参考大佬用CH341驱动OLED,链接如下:GitHub - jimjiang2/ch341dll_wrap_typical_app: A ch341dll Wrap is for using in Python 32bits windows to access I2C SPI and MDIO (by GPIO), and Demo with display PC sreen on OLED by i2c or SPI .

         本文主要实现了CH341驱动LCD显示汉字。

一、源码

import random
import time
import numpy as np
from matplotlib import pyplot as plt
import os
import random
import numpy as np
from fractions import Fraction
import pyautogui
from PIL import Image
import binascii
import struct
import codecs
import binascii## call ch341dll_wrap
from ch341dll_32bits_wrap.ch341dll_wrap  import *###1.  init ch341 device
hd = CH341DEV(0)
hd.ch341_i2c_speed(3)
#hd.ch341_close()###2.  init oled ----
#原驱动是1306,这里用的是UC1601,函数名没改
hd.spi_oled1306_3w(0,0xe2)
hd.spi_oled1306_3w(0,0x2f)	#Set Power Control loading 15-24nF
hd.spi_oled1306_3w(0,0xa6)	# Set 0xa6正常 Display;0xa7 反显
hd.spi_oled1306_3w(0,0xc4)
hd.spi_oled1306_3w(0,0xa0)
hd.spi_oled1306_3w(0,0x89)
hd.spi_oled1306_3w(0,0xe8)
hd.spi_oled1306_3w(0,0x81)
hd.spi_oled1306_3w(0,0xdf)	#0xaf Set Vbias : 7.99V 0xff
hd.spi_oled1306_3w(0,0xf1)
hd.spi_oled1306_3w(0,0x3f)
hd.spi_oled1306_3w(0,0xf2)
hd.spi_oled1306_3w(0,0x00)
hd.spi_oled1306_3w(0,0xf3)
hd.spi_oled1306_3w(0,0x3f)
hd.spi_oled1306_3w(0,0x85)
hd.spi_oled1306_3w(0,0xaf)
### initial donedef lcd_address(page,column):column=column-1;page=page-1;din = [];b1=0xB0 + page;b2=column&0x0f;b3=((column>>4)&0x0f)+0x10;hd.spi_oled1306_3w(0,b1);hd.spi_oled1306_3w(0,b2);hd.spi_oled1306_3w(0,b3);def lcd_clr():for i in range(9):lcd_address(i+1,1);for j in range(132):hd.spi_oled1306_3w(1,0x00);def display_graphic_16x16(page,column,data):din = [];for ii in range(32):din.append(int(data[ii]))for i in range(2):lcd_address(page+i,column);for j in range(16):hd.spi_oled1306_3w(1,din[i*16+j]);def display_graphic_16x16_1(page,column,data):din = [];for ii in range(32):din.append(int(data[ii]))for i in range(2):lcd_address(page+i,column);for j in range(16):hd.spi_oled1306_3w(1,din[(1-i)*16+15-j]);arr=[0x02,0xE2,0x22,0x22,0x22,0xFE,0x22,0x22,
0x22,0xFE,0x22,0x22,0x22,0xE2,0x02,0x00,
0x00,0xFF,0x00,0x08,0x06,0x01,0x16,0x08,
0x06,0x01,0x02,0x4C,0x80,0x7F,0x00,0x00,0x80,0x80,0x40,0x20,0x10,0x08,0x04,0xC3,
0x04,0x08,0x10,0x20,0x40,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x12,0xD2,0x52,0x5F,0x52,0xF2,
0x52,0x5F,0x52,0xD2,0x12,0x10,0x10,0x00,
0x00,0x00,0x00,0x9F,0x52,0x32,0x12,0x1F,
0x12,0x32,0x52,0x9F,0x00,0x00,0x00,0x00,0xF2,0x12,0x12,0xF2,0x02,0xF2,0x12,0x12,
0xF2,0x00,0xFC,0x16,0x25,0x84,0xFC,0x00,
0xFF,0x01,0x82,0xFF,0x00,0xFF,0x01,0x82,
0xFF,0x10,0x13,0x12,0x52,0x82,0x7E,0x00,0x00,0xFC,0x04,0x04,0xFC,0x00,0x00,0xFC,
0x04,0x16,0x65,0x04,0x84,0xFC,0x00,0x00,
0x00,0x0F,0x04,0x04,0x0F,0x00,0x10,0x13,
0x12,0x12,0x12,0x52,0x92,0x42,0x3E,0x00,0x00,0x22,0x26,0x1A,0x12,0x02,0x7E,0x80,
0x22,0x26,0x1A,0x12,0x02,0x7E,0x00,0x00,
0x20,0x21,0x29,0x25,0x23,0x25,0x29,0xF1,
0x29,0x25,0x23,0x25,0x29,0x21,0x20,0x00,0x10,0x10,0xD0,0xFF,0x90,0x10,0xFC,0x04,
0x02,0xF8,0x00,0xFC,0x04,0x04,0xFC,0x00,
0x04,0x03,0x00,0xFF,0x00,0x01,0x8F,0x44,
0x32,0x0F,0x00,0xFF,0x04,0x08,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x58,0x38,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#/*"一",8*/0x00,0x10,0x88,0xC4,0x33,0x00,0x40,0x42,
0x42,0x42,0xC2,0x42,0x42,0x42,0x40,0x00,
0x02,0x01,0x00,0xFF,0x00,0x00,0x00,0x00,
0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,#/*"行",9*/0x00,0x00,0xF8,0x08,0x08,0x0C,0x0A,0x09,
0x08,0x08,0x08,0x08,0xF8,0x00,0x00,0x00,
0x00,0x00,0xFF,0x41,0x41,0x41,0x41,0x41,
0x41,0x41,0x41,0x41,0xFF,0x00,0x00,0x00,#/*"白",10*/0x00,0x80,0xEE,0x8A,0xFA,0xAA,0xAE,0x14,
0x12,0xF7,0xAA,0xAA,0xF6,0x12,0x10,0x00,
0x00,0x40,0x40,0x5E,0x52,0x53,0x56,0x5A,
0x52,0x5A,0x1E,0x50,0x90,0x70,0x00,0x00,#/*"鹭",11*/0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x40,
0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00,
0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,#/*"上",12*/0x40,0x44,0x54,0x54,0x54,0x54,0x54,0x7F,
0x54,0x54,0x54,0x54,0x54,0x44,0x40,0x00,
0x00,0x00,0x00,0xFF,0x15,0x15,0x15,0x15,
0x15,0x55,0x95,0x7F,0x00,0x00,0x00,0x00,#/*"青",13*/0x40,0x40,0x42,0x42,0x42,0x42,0x42,0xFE,
0x42,0x42,0x42,0x42,0x42,0x40,0x40,0x00,
0x80,0x80,0x40,0x20,0x10,0x0C,0x03,0x00,
0x03,0x0C,0x10,0x20,0x40,0x80,0x80,0x00,#/*"天",14*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x24,0x24,0x18,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#/*"。",15*/0x10,0x0C,0xC4,0x54,0x4C,0x64,0xD5,0x46,
0x44,0x44,0x4C,0x54,0xC4,0x14,0x0C,0x00,
0x00,0x00,0xFF,0x40,0x44,0x62,0x55,0x49,
0x55,0x43,0x40,0x40,0xFF,0x00,0x00,0x00,#/*"窗",0*/0x40,0x40,0x20,0x20,0x90,0x88,0x94,0xE3,
0x84,0x88,0x90,0x20,0x20,0x40,0x40,0x00,
0x00,0x00,0x00,0xFC,0x44,0x44,0x44,0x44,
0x46,0x45,0x44,0xFC,0x00,0x00,0x00,0x00,#/*"含",1*/0x02,0x02,0xE2,0x22,0x22,0xFE,0x22,0x22,
0x22,0xFE,0x22,0x22,0xE2,0x02,0x02,0x00,
0x00,0x00,0xFF,0x48,0x44,0x43,0x40,0x40,
0x40,0x43,0x44,0x44,0xFF,0x00,0x00,0x00,#/*"西",2*/0x00,0xF0,0x00,0xFF,0x00,0xF0,0x40,0x20,
0x10,0x0C,0x23,0xCC,0x10,0x20,0x40,0x00,
0x00,0x1F,0x10,0x0F,0x08,0x1F,0x00,0x01,
0x09,0x11,0x21,0xD1,0x0D,0x03,0x00,0x00,#/*"岭",3*/0x80,0x80,0x84,0x84,0x84,0x84,0x84,0xFC,
0x82,0x82,0x82,0x83,0x82,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#/*"千",4*/0x24,0x24,0xA4,0xFE,0x23,0x22,0x80,0x70,
0x00,0xFF,0x00,0x80,0x40,0x30,0x00,0x00,
0x08,0x06,0x01,0xFF,0x01,0x86,0x40,0x30,
0x0E,0x01,0x06,0x18,0x20,0x40,0x80,0x00,#/*"秋",5*/0x10,0x0C,0x05,0x55,0x55,0x55,0x05,0x7F,
0x05,0x55,0x55,0x55,0x05,0x14,0x0C,0x00,
0x00,0x00,0x41,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0xFF,0x00,0x00,0x00,#/*"雪",6*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x58,0x38,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#/*",",7*/0x00,0xF8,0x01,0x06,0x00,0x00,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0xFE,0x00,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,#/*"门",8*/0x10,0x60,0x02,0x0C,0xC0,0x00,0xF8,0x08,
0x0C,0x0B,0x08,0x08,0x08,0xF8,0x00,0x00,
0x04,0x04,0x7C,0x03,0x00,0x00,0xFF,0x41,
0x41,0x41,0x41,0x41,0x41,0xFF,0x00,0x00,#/*"泊",9*/0x00,0x08,0x88,0x48,0x28,0x18,0x0F,0xE8,
0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,
0x00,0x20,0x11,0x09,0x05,0x41,0x81,0x7F,
0x01,0x01,0x05,0x09,0x11,0x20,0x00,0x00,#/*"东",10*/0x00,0x00,0x80,0x9E,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x9E,0x80,0x00,0x00,0x00,
0x84,0x84,0x44,0x44,0x24,0x14,0x0C,0x07,
0x0C,0x14,0x24,0x44,0x44,0x84,0x84,0x00,#/*"吴",11*/0x04,0x04,0x04,0x04,0x04,0xFC,0x44,0x44,
0x44,0x44,0x44,0xC4,0x04,0x04,0x04,0x00,
0x80,0x40,0x20,0x18,0x06,0x01,0x00,0x00,
0x40,0x80,0x40,0x3F,0x00,0x00,0x00,0x00,#/*"万",12*/0x00,0x00,0xFE,0x92,0x92,0x92,0x92,0xFE,
0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,
0x40,0x40,0x44,0x44,0x44,0x44,0x44,0x7F,
0x44,0x44,0x44,0x44,0x44,0x40,0x40,0x00,#/*"里",13*/0x80,0x80,0xFC,0x96,0xE5,0x84,0xFC,0x80,
0x40,0x3E,0x02,0x02,0x7E,0x40,0x40,0x00,
0x80,0x60,0x1F,0x02,0x4C,0x80,0x7F,0x00,
0xFE,0x42,0x42,0x42,0x42,0xFE,0x00,0x00,#/*"船",14*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x24,0x24,0x18,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#/*"。",15*/
]lcd_clr();for k in range(4):for i in range(8):din = [];for ii in range(i*32,(i+1)*32):din.append(int(arr[ii+k*32*8]))display_graphic_16x16(1+(int)(i/8)*2+k*2, i*16%128+1,din)### 2.def get_gb2312_bitmap(HZ):# 定义变量gbh = 0  # 汉字机器内码的高位gbl = 0  # 汉字机器内码的低位HzPt = 0  # 指向HZ字符串的指针gbbl = 0  # 根据GB2312编码计算出的点阵信息偏移量bitmaps_combined = b''# 打开文件,文件路径为 "gb2312_80.bin"fp = open("gb2312_80.bin", "rb")if fp is None:  # 如果无法打开文件print("无法打开字体文件。")return 1  # 退出函数# 循环遍历HZ字符串中的每个字符HZ = HZ.encode("gb2312_80")while HzPt < len(HZ):# 将HZ字符串中的每个字符转换为GB2312编码的高位和低位gbh = HZ[HzPt]print(gbh)gbl = HZ[HzPt+1]# 打印GB2312编码的高位和低位#print("高位:0x{:02X}".format(gbh))#print("低位:0x{:02X}".format(gbl))# 根据GB2312编码计算点阵信息的偏移量if gbh >= 0xB0:  # 如果高位大于等于0xB0(这是GB2312编码的起始部分)gbbl = ((gbh - 0xA7) * 94 + (gbl - 0xA1)) * 32  # 根据偏移量计算公式计算偏移量else:  # 如果高位小于0xB0gbbl = ((gbh - 0xA1) * 94 + (gbl - 0xA1)) * 32  # 根据偏移量计算公式计算偏移量print("偏移量:{:06d}".format(gbbl))  # 打印偏移量# 使用计算出的偏移量在文件中定位点阵信息,并读取32个字节的点阵信息fp.seek(gbbl)bitmap = fp.read(32);bitmaps_combined=bitmaps_combined+bitmap# 将HzPt指针向前移动两个位置,准备处理下一个汉字的编码HzPt += 2# 关闭文件和释放内存(这部分在原代码中没有明确指出,我在这里添加了)fp.close()del bitmap  # 释放内存return bitmaps_combinedHZ ="春江潮水连海平,海上明月共潮生。滟滟随波千万里,何处春江无月明!江流宛转绕芳甸,月照花林皆似霰;空里流霜不觉飞,汀上白沙看不见。江天一色无纤尘,皎皎空中孤月轮。江畔何人初见月?江月何年初照人?人生代代无穷已,江月年年望相似。"
b=get_gb2312_bitmap(HZ)
hex_data = binascii.hexlify(b)
hex_string = hex_data.decode('utf-8')
byte_string = bytes.fromhex(hex_string)#lst = b.decode('utf-8').split(',')
arr=list(byte_string);
#print(byte_string)
lcd_clr();
#time.sleep(4);for m in range((int)(len(HZ)/32)):for k in range(4):for i in range(8):din = [];for jj in range(32):din.append(int(arr[32-jj+i*32+k*8*32+m*4*8*32]));display_graphic_16x16_1(1+(int)(i/8)*2+k*2, i*16%128+1,din)time.sleep(5);hd.ch341_close();

二、总结

1、CH341有IIC、SPI这些MCU常用的接口,可以和拥有这些接口标准的设备通讯。

2、CH341通过USB和电脑通讯,可以理解为电脑的外围设备。用电脑编程向CH341发送指令,可以使CH341驱动其他原本需要单片机驱动的设备,比如LCD。

3、电脑的性能远远高于普通的MCU。所以用这种方式可以很容易提高性能,还省了MCU。

4、python实现了汉字->取字库字模->驱动CH341->LCD。关于驱动CH341,请参见大佬的github的源码。本文代码只是import了大佬的CH341 python封装。本源码依赖ch341dll_wrap.py。

5、所用字库为标准GB2312-80 16*16点阵字库。

6、源码需在电脑端执行,CH341硬件支持。

cb7f5f18150d4699852c2e95155718b2.jpg

演示用程序执行效果

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

分享一款基于 AI 的 Chrome 插件

最近使用大模型比较多&#xff0c;公司虽然提供了免费的 ChatGPT 但是需要跳转特定页面才能访问&#xff0c;比较麻烦&#xff0c;于是就想到是否可以开发一款类似于有道词典一样的 Chrome 插件&#xff0c;可以在任意页面使用&#xff0c;虽然市面上也有类似的插件&#xff0c…

分布式消息队列:RabbitMQ(1)

目录 一:中间件 二:分布式消息队列 2.1:是消息队列 2.1.1:消息队列的优势 2.1.1.1:异步处理化 2.1.1.2:削峰填谷 2.2:分布式消息队列 2.2.1:分布式消息队列的优势 2.2.1.1:数据的持久化 2.2.1.2:可扩展性 2.2.1.3:应用解耦 2.2.1.4:发送订阅 2.2.2:分布式消息队列…

生成树协议:监控 STP 端口和交换机

什么是生成树协议 生成树协议 &#xff08;STP&#xff09; 用于网络交换机&#xff0c;以防止循环和广播风暴。在局域网 &#xff08;LAN&#xff09; 中&#xff0c;两条或多条冗余路径可以连接到同一网段。当交换机或网桥从所有可用端口传输帧时&#xff0c;这些帧开始在网…

1818_ChibiOS的计数信号量

全部学习汇总&#xff1a; GreyZhang/g_ChibiOS: I found a new RTOS called ChibiOS and it seems interesting! (github.com) 之前见过计数信号量&#xff0c;也是在FreeRTOS中看到的。也看到过这样的功能在驱动设计中的应用&#xff0c;但是当时没有理解这个使用的方式。 1.…

【STM32】标准库的引入

一、为什么要会有标志外设库 1、传统单片机软件开发方式 (1)芯片厂商提供数据手册、示例代码、开发环境 (2)单片机软件工程师面向产品功能&#xff0c;查阅数据手册&#xff0c;参考官方示例代码进行开发 (3)硬件操作的方式是用C语言对寄存器进行读写以操作硬件 (4)主要工作量…

指针仪表读数YOLOV8NANO

指针仪表读数YOLOV8 NANO 采用YOLOV8 NANO训练&#xff0c;标记&#xff0c;然后判断角度&#xff0c;得出角度&#xff0c;可以通过角度&#xff0c;换算成数据

Table-GPT:让大语言模型理解表格数据

llm对文本指令非常有用&#xff0c;但是如果我们尝试向模型提供某种文本格式的表格数据和该表格上的问题&#xff0c;LLM更有可能产生不准确的响应。 在这篇文章中&#xff0c;我们将介绍微软发表的一篇研究论文&#xff0c;“Table-GPT: Table- tuning GPT for Diverse Table…

Linux系统之watch命令的基本使用

Linux系统之watch命令的基本使用 一、watch命令介绍二、watch命令的使用帮助2.1 watch命令的help帮助2.2 watch命令的语法解释 三、watch命令的基本使用3.1 使用默认的2秒时间间隔执行ls命令3.2 每隔10秒执行一次ps命令3.3 每隔1秒输出一次磁盘使用情况3.4 高亮显示grep命令的输…

Springboot 使用JavaMailSender发送邮件 + Excel附件

目录 1.生成Excel表格 1.依赖设置 2.代码&#xff1a; 2.邮件发送 1.邮件发送功能实现-带附件 2.踩过的坑 1.附件名中文乱码问题 3.参考文章&#xff1a; 需求描述&#xff1a;项目审批完毕后&#xff0c;需要发送邮件通知相关人员&#xff0c;并且要附带数据库表生成的…

京东平台数据分析:2023年9月京东空气净化器行业品牌销售排行榜

鲸参谋监测的京东平台9月份空气净化器市场销售数据已出炉&#xff01; 9月份&#xff0c;空气净化器的销售同比上年增长。根据鲸参谋平台的数据显示&#xff0c;今年9月&#xff0c;京东平台空气净化器的销量将近15万&#xff0c;同比增长约1%&#xff1b;销售额将近2亿元&…

C++多态(超级详细版)

目录 一、什么是多态 二、多态的定义及实现 1.多态构成条件 2.虚函数的重写和协变 虚函数重写的两个例外&#xff1a; 2.1协变 2.2析构函数的重写 &#xff08;析构函数名统一处理成destructor&#xff09; 3.重载、覆盖(重写)、隐藏(重定义)的对比 4.final 和 overr…

【计算机网络笔记】DNS报文格式

DNS 提供域名到主机IP地址的映射  域名服务的三大要素&#xff1a;  域&#xff08;Domain&#xff09;和域名(Domain name)&#xff1a; 域指由地 理位置或业务类型而联系在一起的一组计算机构 成。  主机&#xff1a;由域名来标识。域名是由字符和&#xff08;或&a…

如何在linux服务器上安装Anaconda与pytorch,以及pytorch卸载

如何在linux服务器上安装Anaconda与pytorch&#xff0c;以及pytorch卸载 1&#xff0c;安装anaconda1.1 下载anaconda安装包1.2 安装anaconda1.3 设计环境变量1.4 安装完成验证 2 Anaconda安装pytorch2.1 创建虚拟环境2.2 查看现存环境2.3 激活环境2.4 选择合适的pytorch版本下…

Python:实现日历到excel文档

背景 日历是一种常见的工具,用于记录事件和显示日期。在编程中,可以使用Python编码来制作日历。 Python提供了一些内置的模块和函数,使得制作日历变得更加简单。 在本文,我们将探讨如何使用Python制作日历,并将日历输出到excel文档中。 效果展示 实现 在代码中会用到cale…

FFmpeg5.1.3编译动态库踩坑之旅(基于Linux虚拟机)

准备工作 环境准备 1.Windows安装Oracle VM VirtualBox 7.0.10&#xff0c;安装ubuntu-22.04.3。 坑一&#xff1a;无法往虚拟机里拖放复制文件&#xff0c;解决办法&#xff1a;登录Ubuntu虚拟机时切换到xorg方式登录&#xff0c;参考地址&#xff1a;Ubuntu Desktop 22.04…

软考系统架构之案例篇(架构设计相关概念)

案例篇-架构设计相关概念 1. 架构风格的概念2. 五大架构风格有哪些3. MVC架构含义4. 云计算架构5. 云原生架构设计原则6. ESB的主要功能包括7. 质量属性的含义及其设计策略8. EJB中的 Bean 分三种类型9. 风险点、敏感点、权衡点的含义10. REST 的5个原则 其它相关推荐&#xff…

Generative AI 新世界 | Falcon 40B 开源大模型的部署方式分析

在上期文章&#xff0c;我们探讨了如何在自定义数据集上来微调&#xff08;fine-tuned&#xff09;模型。本期文章&#xff0c;我们将重新回到文本生成的大模型部署场景&#xff0c;探讨如何在 Amazon SageMaker 上部署具有 400 亿参数的 Falcon 40B 开源大模型。 亚马逊云科技…

ICLR 2023丨3DSQA:3D 场景中的情景问答

来源&#xff1a;投稿 作者&#xff1a;橡皮 编辑&#xff1a;学姐 论文链接&#xff1a;https://arxiv.org/pdf/2210.07474.pdf 主页链接&#xff1a;http://sqa3d.github.io 图 1&#xff1a;3D 场景中情景问答 (SQA3D) 的任务图示。给定场景上下文 S&#xff08;例如&#…

并发编程 - 并发可见性,原子性,有序性 与 JMM内存模型

1. 并发三大特性 并发编程Bug的源头&#xff1a; 原子性 、 可见性 和 有序性 问题 1.1 原子性 一个或多个操作&#xff0c;要么全部执行且在执行过程中不被任何因素打断&#xff0c;要么全部不执行。 在 Java 中&#xff0c;对基本数据类型的变量的读取和赋值操作是原子性操…