Comments (7)
from paddle.
# paddlepaddle = 2.5.2
import paddle
import paddle.nn.functional as F
dim = 1024
paddle.seed(1)
x = paddle.randn([1, dim, 3, 3])
kernel = paddle.zeros((dim, dim, 3, 3))
for i in range(dim):
kernel[i, i, 1, 1] = 1
out = F.conv2d(x, kernel, padding=1)
diff = out - x
print(diff.abs().max())
# 预期值是0,相同逻辑用PyTorch实现是结果为0
# Tensor(shape=[], dtype=float32, place=Place(gpu:0), stop_gradient=True,
# 0.00097394)
from paddle.
# paddlepaddle = 2.5.2 import paddle import paddle.nn.functional as F dim = 1024 paddle.seed(1) x = paddle.randn([1, dim, 3, 3]) kernel = paddle.zeros((dim, dim, 3, 3)) for i in range(dim): kernel[i, i, 1, 1] = 1 out = F.conv2d(x, kernel, padding=1) diff = out - x print(diff.abs().max()) # 预期值是0,相同逻辑用PyTorch实现是结果为0 # Tensor(shape=[], dtype=float32, place=Place(gpu:0), stop_gradient=True, # 0.00097394)
本地用在v100 cuda11.7,paddle develop版本跑的结果符合预期,可以用paddle2.6试试,或者paddle官网的nighty develop版本
from paddle.
我是A800跑的,cuda11.7,试了paddle2.6和nighty develop版本,结果都是0.00097394
from paddle.
Related Issues (20)
- Internal server error. Retry later. HOT 3
- 【HACKATHON 预备营】飞桨启航计划集训营(第二期) HOT 27
- /Paddle/paddle/fluid/framework/fleet/fleet_wrapper.cc:1304:39: error: 'using element_type = class paddle::ps::PSClient' {aka 'class paddle::ps::PSClient'} has no member named 'save_multi_table_one_path'
- 编译third_party/eigen3报错 HOT 3
- [Paddle Infernce]assign_value OP中的values值为空,导致模型推理出错
- 【Feature Request】前向重计算函数在 use_reentrant == True时支持以关键字参数的方式传入 Tensor HOT 2
- C API函数`PD_PredictorRun`未正确处理C++异常 HOT 1
- 建议为Paddle的C API增加日志回调函数 HOT 1
- 使用cpu流式输入预测,dropout为is_test且无bn,预测结果会有一定随机性,每次不一致,且和gpu原始预测代码结果不同。 HOT 1
- 嘿,我在运行paddle官网的例子出现了这个情况无法解决,不知道是哪里有问题了 HOT 2
- paddle与slice切片组合报错 HOT 3
- 根据官方例子无法复现paddle.unfold() HOT 4
- Custom Device是否能够支持BFloat16 HOT 5
- 根据官网教程在因特尔CPU以及昆仑2代芯片编译安装XPU出现 Built target extern_mkldnn 错误 HOT 5
- paddle.nn.functional.pad与torch.nn.functional.pad不一致 HOT 1
- [2024 Q2] 编译资料夹空间优化目标 HOT 2
- cinn 编译失败 HOT 4
- cudnn9 目前是否还没有适配呢 HOT 1
- take_along_axis广播行为与NumPy不一致 take_along_axis inconsistent broadcasting behavior with NumPy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paddle.