Transformer understanding
The transformer model was introduced in 2017 by Google's paper Attention Is All You Need
.
Below image shows the architecture of the transformer model which is from the Google's paper Attention Is All You Need
.
The transformer model was introduced in 2017 by Google's paper Attention Is All You Need
.
Below image shows the architecture of the transformer model which is from the Google's paper Attention Is All You Need
.
attrdict
trapAttrDict is an MIT-licensed library that provides mapping objects that allow their elements to be accessed both as keys and as attributes.
It's already not support the current python version now, for the lower version python, it's a useful library.
However, there is some magic behavior while using it.
hasattr
difference between 2 and 3hasattr
is a python built in method, which can be used to determine whether an object has an attribute.
For example, we can check the dog object has name
and age
, but doesn't have gender
.