1761555758e76f8e403549a75651d4b31a8a9fc2,intermediate_source/named_tensor_tutorial.py,,,#,35

Before Change


// - A named dim can only be refined to have the same name.

print(imgs.names)
print(imgs.refine_names("N", "C", "H", "W").names)

// Coerces the last two dims to "H" and "W". In Python 2, use the string "..." instead of ...
print(imgs.refine_names(..., "H", "W").names)

After Change


// - A named dim can only be refined to have the same name.

imgs = torch.randn(3, 1, 1, 2)
named_imgs= imgs.refine_names("N", "C", "H", "W")
print(named_imgs.names)

// Coerces the last two dims to "H" and "W". In Python 2, use the string "..." instead of ...
print(imgs.refine_names(..., "H", "W").names)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pytorch/tutorials
Commit Name: 1761555758e76f8e403549a75651d4b31a8a9fc2
Time: 2019-10-07
Author: sethweidman@fb.com
File Name: intermediate_source/named_tensor_tutorial.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: 9d5c022d00ae5b0e4e864e951b67f729cdfa14ce
Time: 2019-10-09
Author: zou3519@gmail.com
File Name: intermediate_source/named_tensor_tutorial.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: 91ccc857aa0f5ca2c1c324d6f9d3556adc58b234
Time: 2019-10-08
Author: sethweidman@fb.com
File Name: intermediate_source/named_tensor_tutorial.py
Class Name:
Method Name: