This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(p39) [ec2-user@ip-172-31-22-97 ~]$ pip install statsmodels -vv | |
Using pip 22.0.3 from /home/ec2-user/anaconda3/envs/p39/lib/python3.9/site-packages/pip (python 3.9) | |
Non-user install because site-packages writeable | |
Created temporary directory: /tmp/pip-ephem-wheel-cache-se1v741j | |
Created temporary directory: /tmp/pip-req-tracker-hnyt40re | |
Initialized build tracking at /tmp/pip-req-tracker-hnyt40re | |
Created build tracker: /tmp/pip-req-tracker-hnyt40re | |
Entered build tracker: /tmp/pip-req-tracker-hnyt40re | |
Created temporary directory: /tmp/pip-install-c1qsject | |
1 location(s) to search for versions of statsmodels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if w1_root < w2_root: | |
w1_root, w2_root = w2_root, w1_root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class L2Normalize(Function): | |
def forward(self, inputs): | |
xp = cuda.get_array_module(*inputs) | |
x, = inputs | |
if type(x) is cuda.ndarray: | |
Xnp = cuda.cupy.asnumpy(x) | |
self._norm = xp.asarray(xp.expand_dims(np.linalg.norm(Xnp, ord=2, axis=1), axis=1), dtype=xp.float32) | |
else: | |
self._norm = xp.expand_dims(np.linalg.norm(x, ord=2, axis=1), axis=1) |