官术网_书友最值得收藏!

Casting a tensor to a NumPy/Python variable

Should you need to, you can cast a tensor to a numpy variable as follows:

print(t2.numpy())

The output will be as follows:

[[[ 0. 1. 2.] [ 3. 4. 5.]] [[ 6. 7. 8.] [ 9. 10. 11.]]]

Take this, also:

print(t2[1, 0, 2].numpy())

The output will be as follows:

8.0
主站蜘蛛池模板: 玉环县| 南溪县| 清苑县| 万山特区| 电白县| 鸡泽县| 西乡县| 高青县| 吴旗县| 江陵县| 苗栗市| 长乐市| 荥经县| 呈贡县| 行唐县| 临邑县| 南郑县| 望都县| 闻喜县| 内乡县| 若羌县| 吴桥县| 万年县| 万盛区| 车险| 邮箱| 车致| 永清县| 天全县| 十堰市| 菏泽市| 洞头县| 和林格尔县| 义乌市| 伽师县| 漳平市| 孝义市| 岐山县| 沽源县| 乌恰县| 新干县|