TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #199 · 8 јан.

Многие из тех кто активно работал с Python2 несколько удивлены, почему в Python3 удобная функция reload() переехала из builtin в imp а потом и в importlib? Ну было же удобно! А теперь лишний импорт😖 Дело в том, что начиная с Python3.3 функция reload() переписана на Python вместо Cи. Что это нам даёт? 🔸 Такой код проще поддерживать и развивать 🔸 Python код легче читать, изучать и понимать. Сравните это ➡️ и это ➡️. 🔸 Как результат пункта 2, проще писать свои расширения импорта. Например, пользовательский импортёр с какой-либо хитрой логикой по аналогии с импортом из zip архивов. А есть ли у этого решения недостатки? Да, они всегда есть. 🔹 Так как это не builtin функция, её следует импортнуть перед использованием 🔹 Скорость замедлилась примерно на 5%. Очевидно, что это совершенно не критично. К тому же от версии к версии логика импорта будет оптимизироваться и ускоряться. В самом начале файла importlib/__init__.py мы видим такой импорт: import _imp # Just the builtin component, NOT the full Python module То есть часть функционала по прежнему написана на Си, но достаточно низкоуровневая. #basic

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #representation

当前筛选 #representation清除筛选
Am Neumarkt 😱

@amneumarkt · Post #261 · 13.09.2021 г., 05:49

#ML#self-supervised #representation Contrastive loss is widely used in representation learning. However, the mechanism behind it is not as straightforward as it seems. Wang & Isola proposed a method to rewrite the contrastive loss in to alignment and uniformity. Samples in the feature space are normalized to unit vectors. These vectors are allocated onto a hypersphere. The two components of the contrastive loss are - alignment, which forces the positive samples to be aligned on the hypersphere, and - uniformity, which distributes the samples uniformly on the hypersphere. By optimization of such objectives, the samples are distributed on a hypersphere, with similar samples clustered, i.e., pointing to the similar directions. Uniformity makes sure the samples are using the whole hypersphere so we don't waste "space". References: Wang T, Isola P. Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere. arXiv [cs.LG]. 2020. Available: http://arxiv.org/abs/2005.10242

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40401 · 24.12.2025 г., 15:01

The Bechdel-Wallace Test checks if a movie or story has at least two women who talk to each other about something other than a man. It shows how women are often missing or only shown in relation to men. Many films fail this simple test, highlighting the need for better female representation in media. 👱‍♀👩‍🦳🚫🤷‍♂ [Read more] [See more] @googlefactss #BechdelWallaceTest🎬#WomenInFilm#Representation#Equality