Value changed after loading a saved tensor
<SCODE>A = torch.from_numpy(A_array)
checkEmpty(A) # passed

torch.save(A, 'A_tensor')
A = torch.load('A_tensor')
checkEmpty(A) # failed
<ECODE> Then to find the first ZERO map: <SCODE>for i in range(A.size()[0]):
		for j in range(A.size()[1]):
			if torch.max(A[i][j]) == 0.0:
				print(i, j)
<ECODE>
Xiaoyu_Liu
smth
Thank you. But how to check the version of currently used Pytorch?
Xiaoyu_Liu
What OS are you on? I just tried this small snippet on Linux (CentOS7) and on OSX: <SCODE>import torch

a = torch.ones(800*3*480*640)
print(a.eq(0).sum())
torch.save(a, 'a.pth')
b = torch.load('a.pth')

print(b.eq(0).sum())
<ECODE> On Linux it works fine, on OSX i get an error, which i am investigating: <SCODE>0
Traceback (most recent call last):
  File "a.py", line 5, in <module>
    torch.save(a, 'a.pth')
  File "/Users/soumith/code/pytorch/torch/serialization.py", line 120, in save
    return _save(obj, f, pickle_module, pickle_protocol)
  File "/Users/soumith/code/pytorch/torch/serialization.py", line 192, in _save
    serialized_storages[key]._write_file(f)
RuntimeError: Unknown error: -1
<ECODE>
smth
Thank you, I’m working on Ubuntu 14.04.1
Xiaoyu_Liu
Xiaoyu_Liu
I tried it on an ubuntu 14.04 as well, but couldn’t reproduce the issue. <SCODE>lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty
<ECODE> <SCODE>$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
<ECODE> I’m not sure locale matters, i am trying to eliminate variables. <SCODE>$ uname -a
Linux fatbox 3.16.0-37-generic #51~14.04.1-Ubuntu SMP Wed May 6 15:23:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
<ECODE> <SCODE>$ df -h
Filesystem      Size  Used Avail Use% Mounted on
**/dev/sda2       355G  302G   35G  90% /**
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            5.9G  4.0K  5.9G   1% /dev
tmpfs           1.2G  1.7M  1.2G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            5.9G  124M  5.8G   3% /run/shm
none            100M  152K  100M   1% /run/user
/dev/sda4        96M   29M   68M  30% /boot/efi
/dev/sdb2       2.7T  2.0T  609G  77% /media/hdd2
<ECODE>
smth
<SCODE>$ lab_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.4 LTS
Release:	14.04
Codename:	trusty
<ECODE> <SCODE>$ locale
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8"
LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=
<ECODE> <SCODE>$ uname -a
Linux sengled-gpu-1 4.2.0-35-generic #40~14.04.1-Ubuntu SMP Fri Mar 18 16:37:35 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
<ECODE> <SCODE>$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             32G  4.0K   32G   1% /dev
tmpfs           6.3G  1.9M  6.3G   1% /run
/dev/sda2       854G  578G  233G  72% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none             32G   76K   32G   1% /run/shm
none            100M   56K  100M   1% /run/user
/dev/sda1       511M  3.4M  508M   1% /boot/efi
<ECODE>
Xiaoyu_Liu
But when I try to install the latest version, this error happens, <SCODE>SSLError: [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
<ECODE> If you are experienced with it, can you tell me how to solve that? If not, I’ll figure out it somewhere else:smiley:
Xiaoyu_Liu
Hello, do and try installing the package again.
apolis
Thanks! But after installing these, the problem can’t be solved yet… Then I refreshed the pytorch website to install again, it works. Magical…
Xiaoyu_Liu
smth