
获得徽章 0
- 学习 tensorflow.js, 下面代码输出 为什么是,请大佬指点下
Tensor
[[
[[2], [1], [2], [1]],
[[1], [2], [1], [2]],
[[1], [1], [1], [1]],
[[1], [1], [1], [1]]
]]
// -------------- 代码如下 -----------
// 输入图像 (4x4)
const input = tf.tensor4d([[
[[1], [1], [1], [0]],
[[0], [1], [1], [1]],
[[0], [0], [1], [1]],
[[0], [0], [1], [1]]
]]);
// 滤波器 (3x3)
const kernel = tf.tensor4d([[
[[1]], [[0]], [[1]],
[[0]], [[1]], [[0]],
[[1]], [[0]], [[1]]
]]);
// 卷积操作
const output = tf.conv2d(input, kernel, 1, 'same');
output.print();展开评论点赞 - 分享开源一款 Vue3 + AntDesignVue + Vite 后台管理系统模版等人赞过19
- 长文讲解 如何开发 Draggable GridView 组件,感兴趣的掘友们请查看~赞过评论1