albertbup / deep-belief-network

A Python implementation of Deep Belief Networks built upon NumPy and TensorFlow with scikit-learn compatibility
MIT License
481 stars 212 forks source link

Can't install due to requirement for old version of tensorflow #22

Closed mvkrein closed 7 years ago

mvkrein commented 7 years ago

There is reference to tensorflow 1.0.0 as a requirement preventing installation:

Collecting tensorflow==1.0.0 (from deep-belief-network==1.0.1) Could not find a version that satisfies the requirement tensorflow==1.0.0 (from deep-belief-network==1.0.1) (from versions: 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0) No matching distribution found for tensorflow==1.0.0 (from deep-belief-network==1.0.1)

albertbup commented 7 years ago

I've just installed tensorflow 1.0.0 without problems:

$ pip install tensorflow==1.0.0 Collecting tensorflow==1.0.0 Using cached tensorflow-1.0.0-cp35-cp35m-manylinux1_x86_64.whl Collecting protobuf>=3.1.0 (from tensorflow==1.0.0) Using cached protobuf-3.3.0-cp35-cp35m-manylinux1_x86_64.whl Requirement already satisfied: wheel>=0.26 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: numpy>=1.11.0 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: six>=1.10.0 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: setuptools in ./env/lib/python3.5/site-packages (from protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: packaging>=16.8 in ./env/lib/python3.5/site-packages (from setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: appdirs>=1.4.0 in ./env/lib/python3.5/site-packages (from setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: pyparsing in ./env/lib/python3.5/site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Installing collected packages: protobuf, tensorflow Successfully installed protobuf-3.3.0 tensorflow-1.0.0

I suggest you to install my package in a separated enviroment (very easy to set up!) so that you avoid to be bothered by package version issues. Use virtualenv for that, check here for a quick introducion.

mvkrein commented 7 years ago

Hi,

Thanks for the reply. I had tried this and I received the message that 1.0.0 is not available:

c:\Users\Mark\Anaconda3\Scripts>pip install tensorflow==1.0.0

Collecting tensorflow==1.0.0

Could not find a version that satisfies the requirement tensorflow==1.0.0 (from versions: 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1)

No matching distribution found for tensorflow==1.0.0

What I ended up doing was cloning your git repo and modifying the requirements.txt file to look like this:

numpy==1.12.1

scipy==0.19.0

scikit-learn==0.18.1

tensorflow==1.2.1

And then I installed from my local copy of your git repo.

I have been running your classification_demo.py program which seems to run fine. I'm having other issues with my own dbn test which I'm sure are due to user error (no reduction in training loss during fine tuning; constant value of predicted probability for each test record; no impact in changing learning rate, batch size, # of iterations, etc.). But maybe there is a compatibility issue with tensorflow 1.2.1.

Thanks for your help!

Mark

From: albertbup [mailto:notifications@github.com] Sent: Thursday, July 27, 2017 5:22 PM To: albertbup/deep-belief-network Cc: mvkrein; Author Subject: Re: [albertbup/deep-belief-network] Can't install due to requirement for old version of tensorflow (#22)

I've just installed tensorflow 1.0.0 without problems:

$ pip install tensorflow==1.0.0 Collecting tensorflow==1.0.0 Using cached tensorflow-1.0.0-cp35-cp35m-manylinux1_x86_64.whl Collecting protobuf>=3.1.0 (from tensorflow==1.0.0) Using cached protobuf-3.3.0-cp35-cp35m-manylinux1_x86_64.whl Requirement already satisfied: wheel>=0.26 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: numpy>=1.11.0 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: six>=1.10.0 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: setuptools in ./env/lib/python3.5/site-packages (from protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: packaging>=16.8 in ./env/lib/python3.5/site-packages (from setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: appdirs>=1.4.0 in ./env/lib/python3.5/site-packages (from setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: pyparsing in ./env/lib/python3.5/site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Installing collected packages: protobuf, tensorflow Successfully installed protobuf-3.3.0 tensorflow-1.0.0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/albertbup/deep-belief-network/issues/22#issuecomment-318490227 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGC-dgbEVrgG7Gf8O-PlyWmF_09c7TWEks5sSP96gaJpZM4OljsA . https://github.com/notifications/beacon/AGC-dkmROK16lyrsO32YL17EyXRv2v1tks5sSP96gaJpZM4OljsA.gif

mvkrein commented 7 years ago

...as a follow-up, I think I resolved my user errors and have been able to get your dbn implementation to work fine using tensorflow 1.2.1. Thanks again!

Mark

From: Mark Krein [mailto:mvkrein@gmail.com] Sent: Thursday, July 27, 2017 9:58 PM To: 'albertbup/deep-belief-network'; 'albertbup/deep-belief-network' Cc: 'Author' Subject: RE: [albertbup/deep-belief-network] Can't install due to requirement for old version of tensorflow (#22)

Hi,

Thanks for the reply. I had tried this and I received the message that 1.0.0 is not available:

c:\Users\Mark\Anaconda3\Scripts>pip install tensorflow==1.0.0

Collecting tensorflow==1.0.0

Could not find a version that satisfies the requirement tensorflow==1.0.0 (from versions: 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1)

No matching distribution found for tensorflow==1.0.0

What I ended up doing was cloning your git repo and modifying the requirements.txt file to look like this:

numpy==1.12.1

scipy==0.19.0

scikit-learn==0.18.1

tensorflow==1.2.1

And then I installed from my local copy of your git repo.

I have been running your classification_demo.py program which seems to run fine. I'm having other issues with my own dbn test which I'm sure are due to user error (no reduction in training loss during fine tuning; constant value of predicted probability for each test record; no impact in changing learning rate, batch size, # of iterations, etc.). But maybe there is a compatibility issue with tensorflow 1.2.1.

Thanks for your help!

Mark

From: albertbup [mailto:notifications@github.com] Sent: Thursday, July 27, 2017 5:22 PM To: albertbup/deep-belief-network Cc: mvkrein; Author Subject: Re: [albertbup/deep-belief-network] Can't install due to requirement for old version of tensorflow (#22)

I've just installed tensorflow 1.0.0 without problems:

$ pip install tensorflow==1.0.0 Collecting tensorflow==1.0.0 Using cached tensorflow-1.0.0-cp35-cp35m-manylinux1_x86_64.whl Collecting protobuf>=3.1.0 (from tensorflow==1.0.0) Using cached protobuf-3.3.0-cp35-cp35m-manylinux1_x86_64.whl Requirement already satisfied: wheel>=0.26 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: numpy>=1.11.0 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: six>=1.10.0 in ./env/lib/python3.5/site-packages (from tensorflow==1.0.0) Requirement already satisfied: setuptools in ./env/lib/python3.5/site-packages (from protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: packaging>=16.8 in ./env/lib/python3.5/site-packages (from setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: appdirs>=1.4.0 in ./env/lib/python3.5/site-packages (from setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Requirement already satisfied: pyparsing in ./env/lib/python3.5/site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow==1.0.0) Installing collected packages: protobuf, tensorflow Successfully installed protobuf-3.3.0 tensorflow-1.0.0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/albertbup/deep-belief-network/issues/22#issuecomment-318490227 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGC-dgbEVrgG7Gf8O-PlyWmF_09c7TWEks5sSP96gaJpZM4OljsA . https://github.com/notifications/beacon/AGC-dkmROK16lyrsO32YL17EyXRv2v1tks5sSP96gaJpZM4OljsA.gif

ilovespx commented 7 years ago

I am also seeing no change in loss during fine tuning, I'm getting a nan value on latest version of Tensorflow. How did you go about fixing the problem Mark?

mvkrein commented 7 years ago

Hi, I had a couple of issues:

  1. My data had some nan's
  2. I had a bad set of hidden layers that I modified to just 2 layers and it started working
  3. Not sure if this made a difference, but I modified my data to float32 (following your example) and modified my target to integer. Mark

Sent from my iPhone

On Jul 28, 2017, at 3:35 PM, slayer notifications@github.com wrote:

I am also seeing no change in loss during fine tuning, I'm getting a nan value on latest version of Tensorflow. How did you go about fixing the problem Mark?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.