Torch

ph
Admin (토론 | 기여)님의 2017년 7월 12일 (수) 14:40 판
이동: 둘러보기, 검색

links

iTorch

https://github.com/facebook/iTorch
ipython같이 쓸 수 있음.

etc

storage

Tensor is a particular way of viewing a Storage. storage로 접근하면 내부 배열에 순차적으로 접근 가능. matlab에서 2차원 이상 배열을 1차원배열 index로 접근하는 것과 동일.

x = torch.Tensor(4,5)
s = x:storage()
for i=1,s:size() do -- fill up the Storage
  s[i] = i
end

apply

x:apply(function(x)
  return x
end)