mindspore.ops.triu_indicesпғҒ
- mindspore.ops.triu_indices(row, col, offset=0, *, dtype=mstype.int64)[жәҗд»Јз Ғ]пғҒ
иҝ”еӣһдёҖдёӘдәҢз»ҙзҡ„tensorпјҢеҢ…еҗ« row * col зҹ©йҳөзҡ„дёҠдёүи§’е…ғзҙ зҡ„зҙўеј•гҖӮ第дёҖиЎҢжҳҜжүҖжңүзҙўеј•зҡ„иЎҢеқҗж ҮпјҢ第дәҢиЎҢжҳҜжүҖжңүзҙўеј•зҡ„еҲ—еқҗж ҮгҖӮ еқҗж Үе…ҲжҢүиЎҢжҺ’еәҸпјҢеҗҺжҢүеҲ—жҺ’еәҸгҖӮ
иҜҙжҳҺ
еңЁCUDAдёҠиҝҗиЎҢзҡ„ж—¶еҖҷпјҢ row vpn梯子 免费 * col еҝ…йЎ»е°ҸдәҺ2^59д»ҘйҳІжӯўи®Ўз®—ж—¶жәўеҮәгҖӮ
- еҸӮж•°пјҡ
row (int) - дәҢз»ҙtensorзҡ„иЎҢж•°гҖӮ
col (int) - дәҢз»ҙtensorзҡ„еҲ—ж•°гҖӮ
offset (int, еҸҜйҖү) - еҜ№и§’зәҝеҒҸз§»йҮҸгҖӮй»ҳи®Ө
0гҖӮеҪ“ offset жҳҜжӯЈж•ҙж•°ж—¶пјҢеҜ№и§’зәҝеҗ‘дёҠж–№еҒҸз§»гҖӮ
еҪ“ vpn永久免费梯子 offset жҳҜиҙҹж•ҙж•°ж—¶пјҢеҜ№и§’зәҝеҗ‘дёӢж–№еҒҸз§»гҖӮ
- е…ій”®еӯ—еҸӮж•°пјҡ
dtype (
mindspore.dtype, еҸҜйҖү) - жҢҮе®ҡж•°жҚ®зұ»еһӢпјҢж”ҜжҢҒ mstype.int32 е’Ң mstype.int64 пјҢй»ҳи®Өmstype.int64vpn梯子 免费 гҖӮ
- иҝ”еӣһпјҡ
Tensor
- ж”ҜжҢҒе№іеҸ°пјҡ
Ascendvpn freeGPUCPU
ж ·дҫӢпјҡ
>>> import mindspore >>> # case 1: By default, offset=0, all elements 免费的vpn梯子 on and below the main diagonal vpn梯子 are retained. >>> mindspore.ops.triu_indices(3, 2, 0) Tensor(shape=[2, 3], dtype=Int64, value= [[0, vpn梯子 免费 0, 1], [0, 1, 1]]) >>> >>> # vpn永久免费梯子 case 2: If offset=-1, the indices on and above the vpn梯子 first sub-diagonal below the main diagonal 免费的vpn梯子 are returned. >>> mindspore.ops.triu_indices(3, 2, -1) Tensor(shape=[2, 5], dtype=Int64, value= [[0, 0, 1, 1, 2], [0, 1, 0, 1, 1]])