{"version":"1.0","title":"TensorFlow\u3068PyTorch\u306e\u6bd4\u8f03","provider_name":"Hatena Blog","url":"https://randommemory.hatenablog.com/entry/2019/11/04/145754","author_url":"https://blog.hatena.ne.jp/derwind/","height":"190","type":"rich","width":"100%","published":"2019-11-04 14:57:54","author_name":"derwind","blog_url":"https://randommemory.hatenablog.com/","categories":["machine_learning"],"description":"import torch import numpy as np import tensorflow as tf \u3092\u3057\u3066\u304a\u3044\u3066\u6bd4\u8f03\u3057\u3066\u307f\u308b\u3002 def softmax(x): return torch.exp(x) / (torch.sum(torch.exp(x), dim=1)).view(-1, 1) # use float point instead of int in order to avoid 'exp_vml_cpu not implemented for 'Long'' error data = np.array([[1,2], [3,1]], dtype=np.float64)\u2026","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frandommemory.hatenablog.com%2Fentry%2F2019%2F11%2F04%2F145754\" title=\"TensorFlow\u3068PyTorch\u306e\u6bd4\u8f03 - \u3089\u3093\u3060\u3080\u306a\u8a18\u61b6\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u3089\u3093\u3060\u3080\u306a\u8a18\u61b6","provider_url":"https://hatena.blog"}