PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.13k stars 5.55k forks source link

[论文复现]如何创建复数的parameter #45020

Closed renmada closed 1 year ago

renmada commented 2 years ago

问题描述 Please describe your issue

  1. paddle.create_parameter不能创建complex64的类型
  2. set value 报错
    self.weight = paddle.create_parameter([self.num_freqs, in_channels, out_channels], dtype=paddle.float32)
    self.weight.set_value(paddle.as_complex(paddle.randn([self.num_freqs, in_channels, out_channels, 2])))
    need tensor with dtype paddle.float32  but load tensor with dtype paddle.complex64
paddle-bot[bot] commented 2 years ago

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

pangyoki commented 2 years ago

你好,目前不支持复数类型的参数,请问是在什么场景下需要使用呢?

renmada commented 2 years ago

论文复现赛,torch代码

        self.weight = nn.Parameter(torch.empty((self.num_freqs, in_channels, out_channels), dtype=torch.cfloat))
ZhangCheng2332 commented 2 years ago

你好,目前不支持复数类型的参数,请问是在什么场景下需要使用呢?

您好,我论文中需要计算很多含有虚数的张量,其中有一个要求就是计算paddle.exp(L),其中L为tensor,dtype为paddle.complex64。但是paddle.exp()只允许输入数据类型为float32、float64的tensor。请问有没有什么解决办法,让我计算dtype为paddle.complex64的tensor时不损失虚部。

Ligoml commented 2 years ago

复数创建是支持的,但是API还未做到全量支持,你可以梳理一下需要复数计算的API有哪些,我们综合看下~ 另外论文复现组委会需要看下这个题目 @Evezerest

littletomatodonkey commented 2 years ago

你好,这篇论文的编号是多少呢?

aptx1231 commented 2 years ago

你好,这篇论文的编号是多少呢?

我在复现论文57,CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting。也遇到了这个问题,无法创建复数类型的参数。

【repo链接】:https://github.com/aptx1231/CoST_Paddle

littletomatodonkey commented 2 years ago

好的,我们再评估下这篇论文哈,你可以先看看其他的论文~感谢你的反馈

paddle-bot[bot] commented 1 year ago

Since you haven\'t replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。