"""第 09 课补全练习：加入位置信息。修改 solve，保持下方检查不变。"""
import math, io, argparse
import torch
from torch import nn
from torch.nn import functional as F
torch.set_num_threads(2)
torch.manual_seed(26)

def solve(words, positions):
    return words + positions

x=torch.zeros(2,3,4);p=torch.arange(12).view(3,4)
y=solve(x,p)
assert y.shape==(2,3,4) and torch.equal(y[0],y[1])
print("本课补全练习通过。")
