JERRYLSU

torch.nn.CrossEntropyLoss
by Jerry Su, post on Jan 04, 2021

Reason is the light and the light of life.

Python - typing
by Jerry Su, post on Jan 04, 2021

Reason is the light and the light of life.

Read in 1 mins
Python - Generator
by Jerry Su, post on Dec 30, 2020

    函数体中存在yield关键字,即为生成器。调用生成器函数会返回一个生成器对象。即生成器函数就是生成器工厂。

    生成器是迭代器。

    def …

    Read in 1 mins
    Python - Iterable vs Iterator
    by Jerry Su, post on Dec 30, 2020

    import re
    from collections.abc import Iterator, Iterable
    

    鸭子类型,通过协议实现

    1. Iterable

    可迭代协议: __iter__()

    import re
    
    class Sentence1:
        def __init__(self, text …

    Read in 2 mins
    Python - os
    by Jerry Su, post on Dec 24, 2020

    Reason is the light and the light of life.

    Read in 1 mins
    Python Requests
    by Jerry Su, post on Dec 20, 2020

    Reason is the light and the light of life.

    Read in 17 mins
    Python Decorator
    by Jerry Su, post on Dec 20, 2020

    Reason is the light and the light of life.

    Read in 2 mins
    Python Built-in Functions
    by Jerry Su, post on Dec 18, 2020

    Reason is the light and the light of life.

    Read in 1 mins
    CategoricalCrossentropy VS SparseCategoricalCrossentropy
    by Jerry Su, post on Dec 09, 2020

    Reason is the light and the light of life.

    tf.not_equal/reduce_any/boolean_mask
    by Jerry Su, post on Dec 03, 2020

    Reason is the light and the light of life.