关于tensor拉伸成一维的api有吗
收藏
类似于pytorch的view(n,-1)
0
收藏
请登录后评论
fluid.layers.reshape
https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/layers_cn/reshape_cn.html#reshape
用法跟numpy的reshape类似
你好,我想请问一下关于fluid.layers.dice_loss,怎么给tensor增加最后的那个维度,我用reshape尝试后报错
其实paddle的api好多内嵌了flatten操作,你直接拿卷积结果结果放进去,它会给你先flatten之后在做全连接,例子参考:
https://www.paddlepaddle.org.cn/documentation/docs/zh/api_cn/layers_cn/fc_cn.html