原书出处
深入浅出Embedding:原理解析与应用实践 (吴茂贵, 王红星)
12 第12章 用Transformer实现英译中
, :], d_model) # apply sin to even indices in the array; 2i
sines = np.sin(angle_rads[:, 0::2]) # apply cos to odd indices in the array; 2i+1 cosines = np.cos(angle_rads[:, 1::2])
pos_encoding = np.concatenate([sines, cosines], axis=-1) po
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/深入浅出Embedding:原理解析与应用实践 (吴茂贵, 王红星)/_epub-src/OEBPS/Text/Chapter16_0003.xhtml
EPUB SHA-256:0056cad2f11cb1d60ead5054060bd6d41fef87dd049656db310bdc789c0ec7da