Sunlight Zero
Sunlight Zero
我这边是修改前 WA,修改后刚好卡过…… [WA](https://www.luogu.com.cn/record/157748918) [AC](https://www.luogu.com.cn/record/157785868) 这道题时间挺紧张,应该是想卡递归 FFT,不过 XCPC 一般不会卡常吧,个人认为精度更重要一些。
> 应该是会有平衡精度与速度的办法的。一方面,只计算一次sin与cos,再转着圈儿乘,确实会有丢失精度的风险。另一方面如果每个单位根都计算sin与cos,那么计算sin与cos的底层实现相当于带入了插值函数,本身的用时也会高于乘法。 > > 如果可以预处理几个sin和cos,借助预处理的这几个sin和cos以及乘法,计算所有的根,是否可以在精度与速度之间找到一个平衡点?至少可以保持精度不要WA。 确实是可以的,因为用到的单位根都必定是 1/2^n 的倍数,可以把这 n 个单位根预处理出来然后存储,避免多次重复计算三角函数。 另外,据我了解,现代 CPU 是有指令直接计算三角函数 sin 和 cos 的(`fsin` 和 `fcos`,可参考 [Wiki](https://en.wikipedia.org/wiki/X86_instruction_listings) ),所以我认为计算三角函数的复杂度是 O(1)。在循环内计算三角函数会增大常数,但把单位根预处理之后实际上也对 L1 缓存不友好,具体哪种更快可能要看评测机了。
> Hi. Yes. you can run it w/o CFW. Is there any script to run it without CFW? I only find the script with `--vqgan_ckpt` argument. I don't know how...
Hello. I met the same problem. The program has been stuck at validation sanity check for over 12 hours, and no new output is printed. Is it a normal situation?
> there should be something wrong. most likely to be the same issue as above. Could you please tell us the dataset and file structure that you used to train...
> > Hi. Please refer to #44 . > > here Thanks. After annotating this while block, the training code runs normally. Would this code be modified in the future?...