-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed as duplicate of#17740
Labels
Description
On Jupyter Notebook, line numbers should be shown by default because it's really troublesome every time we open a Jupyter Notebook, we need to show line numbers by selecting Show Line Numbers from View or by pressing Shift+L
even though we quite often get error and try to find error code seeing the line numbers in the error messages. *Again, line numbers should be shown by default which is really necessary and important:
from torchvision.datasets import OxfordIIITPet
from torchvision.transforms.v2 import RandomCrop
origin_data = OxfordIIITPet(
root="data",
transform=None,
download=True
)
def show_images(data, main_title=None, s=None, p=None,
pin=False, f=0, pm='constant'):
plt.figure(figsize=[10, 5])
plt.suptitle(t=main_title, y=0.8, fontsize=14)
im = data[0][0]
if not s:
s = [im.size[1], im.size[0]]
for i in range(1, 6)
plt.subplot(1, 5, i)
rc = RandomCrop(size=s, padding=p, pad_if_needed=pin,
fill=f, padding_mode=pm)
plt.imshow(X=rc(im))
plt.tight_layout()
plt.show()
show_images(data=origin_data, main_title="s300_data", s=300)
Cell In[21], line 17
for i in range(1, 6)
^
SyntaxError: expected ':'
