Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to run your code #1

Open
valeriatu opened this issue Aug 17, 2020 · 4 comments
Open

Problems to run your code #1

valeriatu opened this issue Aug 17, 2020 · 4 comments

Comments

@valeriatu
Copy link

Hi,
Probably it is because I'm pretty new with Pytorch and Pysyft but I have some problems to run your code:

If I try:
conda env create -f environment.yml

It creates the conda env but if I run:
python main.py --nopeek_weight 0.1 --epoch 1 --batch_size 32 --learning_rate 0.001 --saveas namemodel --n_train_data 5000

there is the following error:
RuntimeError: shape '[0, -1]' is invalid for input of size 25088

located here:
input_data = input_data.view(input_data.size(0), -1) line 25 - loss.py

Then I tried to create the environment in this way but I can't because if I run this:
conda env create -f environment-lock.yml

I have the following error:
Solving environment: failed

ResolvePackageNotFound:

  • brotlipy==0.7.0=py37h4ab8f01_1000
  • lz4-c==1.9.2=h62dcd97_1
  • sqlite==3.30.1=hfa6e2cd_0
  • kiwisolver==1.2.0=py37heaa310e_0
  • matplotlib-base==3.2.1=py37h911224e_0
  • libpng==1.6.37=hfe6a214_1
  • win_inet_pton==1.1.0=py37_0
  • zstd==1.4.4=h9f78265_3
  • msys2-conda-epoch==20160418=1
  • python==3.7.6=h60c2a47_5_cpython
  • openssl==1.1.1g=he774522_0
  • mistune==0.8.4=py37h8055547_1001
  • libsodium==1.0.17=h2fa13f4_0
  • ninja==1.10.0=h1ad3211_0
  • zlib==1.2.11=h2fa13f4_1006
  • vc==14.1=h869be7e_1
  • libtiff==4.1.0=h885aae3_6
  • m2w64-gcc-libgfortran==5.3.0=6
  • freetype==2.10.2=hd328e21_0
  • zeromq==4.3.2=h6538335_2
  • pyzmq==19.0.1=py37h453f00a_0
  • libclang==9.0.1=default_hf44288c_0
  • m2w64-gmp==6.1.0=2
  • winpty==0.4.3=4
  • pyrsistent==0.16.0=py37h8055547_0
  • pywin32==227=py37hfa6e2cd_0
  • m2w64-gcc-libs==5.3.0=7
  • pyqt==5.12.3=py37h1834ac0_3
  • m2w64-libwinpthread-git==5.0.0.4634.697f757=2
  • tk==8.6.10=hfa6e2cd_0
  • jpeg==9c=hfa6e2cd_1001
  • wincertstore==0.2=py37_1003
  • ipykernel==5.2.1=py37h5ca1d4c_0
  • numpy==1.18.4=py37hae9e721_0
  • markupsafe==1.1.1=py37h8055547_1
  • qt==5.12.5=h7ef1ec2_0
  • m2w64-gcc-libs-core==5.3.0=7
  • icu==64.2=he025d50_1
  • vs2015_runtime==14.16.27012=h30e32a0_2
  • cryptography==2.9.2=py37h26f1ce3_0
  • xz==5.2.5=h2fa13f4_0
  • cffi==1.14.0=py37ha419a9e_0
  • pywinpty==0.5.7=py37_0

I'm using linux...

Thank you in advance

@TTitcombe
Copy link
Owner

For the first issue, that's being caused by a batch of size 0 being passed into DistanceCorrelationLoss somehow. When that happens, input_data.size(0) is 0, and you can't reshape something into (0, -1). I'm not sure yet how that is getting introduced.

For the second issue: does conda env create -f environment.yml work? It may be that the environment-lock file has been corrupted

@TTitcombe
Copy link
Owner

TTitcombe commented Aug 30, 2020

Update: there a few bugs caused by changes in how syft functions. You could install an old syft version, or use branch no-syft if you want to try NoPeek but don't need to use pysyft

@valeriatu
Copy link
Author

Hi,
Thank you for the answer which version of syft should I install?

@TTitcombe
Copy link
Owner

Hi @valeriatu , so sorry for the delay in answering this.
I think 0.2.5 should work (this is the version pinned in environment-lock.yml file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants