2022-01-31

WARNING: This article may be obsolete
This post was published in 2022-01-31. Obviously, expired content is less useful to users if it has already pasted its expiration date.
This article is categorized as "Garbage" . It should NEVER be appeared in your search engine's results.

python 类型注解

def func1(x:int) -> int:
    return 'func1: not int'

if __name__ == '__main__':
    print(func1('not int'))

这段程序既不会引发报错也不会引发警告,会得到结果:

func1: not int

更多内容见:🔗 [​Python 3 新特性:类型注解 - 知乎] https://zhuanlan.zhihu.com/p/37239021

python: 看起来略微奇怪的else用法

for i in range(0,5):
    print(i)
else:
    print('else')

输出结果:

0
1
2
3
4
else

对程序进行一点修改:

errCode = 3
for i in range(0, 5):
    if i == errCode:
        break
    else:
        print(i)
else:
    print('system normal')

得到:

0
1
2

更多解释,见:🔗 [if statement - Why does python use 'else' after for and while loops? - Stack Overflow] https://stackoverflow.com/questions/9979970/why-does-python-use-else-after-for-and-while-loops

AlexNet论文

论文:🔗 [ImageNet Classification with Deep Convolutional Neural Networks] https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf

中文讲解参考:🔗 [AlexNet 论文深度讲解 - 知乎] https://zhuanlan.zhihu.com/p/387848497


试图理解这个(被蓝色选中的文字):

未完成的内容

继续复习C语言

格式塔, Gestalt


 Last Modified in 2022-02-26 

Leave a Comment Anonymous comment is allowed / 允许匿名评论