라이브러리/PyTorch
-
torch.nn라이브러리/PyTorch 2022. 3. 7. 13:56
torch.nn torch.nn enables ueres to quickly instantiate NN architectures by defining some of these high-level aspects as opposed to having to specify all the details manually. import math import torch # assume a 256-dimensional input and a 4-dimensional output for this 1-layer NN # hence, initialize a 256x4 dimensional matrix filled with random values weights = torch.randn(256, 4) / math.sqrt(256..
-
Exager execution라이브러리/PyTorch 2022. 3. 7. 13:44
Tensorflow vs. PyTorch The initial difference between these two was that PyTorch was based on eager execution whereas TensorFlow was built on graph-based deferred execution. Although, TensorFlow now also provides an eager execution mode. Eager execution is basically an imperative programming mode where mathematical operations are computed immediately. A deferred execution mode would have all the..