
Last chance! 50% off unlimited learning
Sale ends in
# NOT RUN {
if (torch_is_installed()) {
a = torch_randn(c(3, 3))
a
torch_triu(a)
torch_triu(a, diagonal=1)
torch_triu(a, diagonal=-1)
b = torch_randn(c(4, 6))
b
torch_triu(b, diagonal=1)
torch_triu(b, diagonal=-1)
}
# }
Run the code above in your browser using DataLab