google / prettytensor

Pretty Tensor: Fluent Networks in TensorFlow
1.24k stars 151 forks source link

import error #43

Closed apiszcz closed 7 years ago

apiszcz commented 7 years ago

version = '0.7.1'

import prettytensor as pt

File "lib\prettytensor__init__.py", line 25, in from prettytensor import funcs File "lib\prettytensor\funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File "lib\prettytensor\pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File "lib\prettytensor\pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(), TypeError: zeros_initializer() missing 1 required positional argument: 'shape'

eiderman commented 7 years ago

To use tensorflow at head, you need to use pretty tensor at head as well. The upstream API is rapidly changing.

On Sun, Dec 25, 2016, 9:29 AM apiszcz notifications@github.com wrote:

version = '0.7.1'

import prettytensor as pt

File "lib\prettytensorinit.py", line 25, in from prettytensor import funcs File "lib\prettytensor\funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File "lib\prettytensor\pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File "lib\prettytensor\pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(), TypeError: zeros_initializer() missing 1 required positional argument: 'shape'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/prettytensor/issues/43, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnmwHRp2GBlSwndiR_eYwvOBfsnpuY6ks5rLqgPgaJpZM4LVcUe .

codesteller86 commented 7 years ago

Is there any update on this issue? I am facing the exact same issue.

I am using Python 3.5.2 |Anaconda 4.2.0 (64-bit)|

import tensorflow as tf
import prettytensor as pt

Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "", line 1, in File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr ettytensor__init__.py", line 25, in from prettytensor import funcs File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr ettytensor\funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr ettytensor\pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr ettytensor\pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(), TypeError: zeros_initializer() missing 1 required positional argument: 'shape'

eiderman commented 7 years ago

Which version of tensorflow and which version of pretty tensor are you using? Pip will be updated to be compatible with tensorflow 1.0 soon after an release candidate, buy ingredients the meantime there are some incompatibilities and the goal is to have PT at head work with tf head and nightly builds and pip work with v12 (I.e. pip install tensorflow)

On Wed, Jan 25, 2017, 12:06 AM Pallab Maji notifications@github.com wrote:

Is there any update on this issue? I am facing the exact same issue.

I am using Python 3.5.2 |Anaconda 4.2.0 (64-bit)|

import tensorflow as tf import prettytensor as pt

Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "", line 1, in File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr

ettytensorinit.py", line 25, in from prettytensor import funcs

File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr

ettytensor\funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import *

File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr

ettytensor\pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod):

File "C:\Continuum\Anaconda3\lib\site-packages\prettytensor-0.7.2-py3.5.egg\pr

ettytensor\pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(), TypeError: zeros_initializer() missing 1 required positional argument: 'shape'

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/google/prettytensor/issues/43#issuecomment-275043877, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnmwAwaG7gBg97ngi9a3sUlLGd8ZAGnks5rVwKIgaJpZM4LVcUe .

codesteller86 commented 7 years ago

Hi, I was able to solve the issue by changing bias=tf.zeros_initializer() to bias=none I have forked another in https://github.com/devilwarz/prettytensor and introduced the changes and then ran the setup. @eiderman do you think this is correct?

YutingZhang commented 7 years ago

Hi @eiderman,

Is pretty tensor (pip version, python 3.5) totally compatible with TF1.0?

Thanks!

eiderman commented 7 years ago

I just pushed a version that is compatible with TF 1.0. Sorry for the delay, I was on vacation.

YutingZhang commented 7 years ago

@eiderman Thank you so much! It is working.

coderguanmingyang commented 7 years ago

how can I slove the problem? I think the prettytensor is not fitted the tensorflow, because of the version.

` File "demo/demo.py", line 4, in import prettytensor as pt File "/usr/local/lib/python2.7/dist-packages/prettytensor/init.py", line 25, in from prettytensor import funcs File "/usr/local/lib/python2.7/dist-packages/prettytensor/funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(), TypeError: zeros_initializer() takes at least 1 argument (0 given)

@eiderman

eiderman commented 7 years ago

Which pretty tensor and which tensor flow version?

On Tue, Mar 28, 2017, 3:22 AM coderguanmingyang notifications@github.com wrote:

how can I slove the problem? I think the prettytensor is not fitted the tensorflow, because of the version.

` File "demo/demo.py", line 4, in import prettytensor as pt File "/usr/local/lib/python2.7/dist-packages/prettytensor/init.py", line 25, in from prettytensor import funcs File "/usr/local/lib/python2.7/dist-packages/prettytensor/funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(),

TypeError: zeros_initializer() takes at least 1 argument (0 given)

@eiderman https://github.com/eiderman

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/google/prettytensor/issues/43#issuecomment-289727288, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnmwCFpTQdK19SUvW6s-El3EcHS3J1Fks5rqN9XgaJpZM4LVcUe .

apiszcz commented 7 years ago

Please close this ticket I have moved on to Keras 2 and TF 1.01

On Mar 28, 2017, at 12:15 PM, eiderman notifications@github.com wrote:

Which pretty tensor and which tensor flow version?

On Tue, Mar 28, 2017, 3:22 AM coderguanmingyang notifications@github.com wrote:

how can I slove the problem? I think the prettytensor is not fitted the tensorflow, because of the version.

` File "demo/demo.py", line 4, in import prettytensor as pt File "/usr/local/lib/python2.7/dist-packages/prettytensor/init.py", line 25, in from prettytensor import funcs File "/usr/local/lib/python2.7/dist-packages/prettytensor/funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(),

TypeError: zeros_initializer() takes at least 1 argument (0 given)

@eiderman https://github.com/eiderman

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/google/prettytensor/issues/43#issuecomment-289727288, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnmwCFpTQdK19SUvW6s-El3EcHS3J1Fks5rqN9XgaJpZM4LVcUe .

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

eiderman commented 7 years ago

I encourage those who open tickets to close them. I'm glad you find a solution that works for you :-)

On Tue, Mar 28, 2017, 11:07 AM apiszcz notifications@github.com wrote:

Please close this ticket I have moved on to Keras 2 and TF 1.01

On Mar 28, 2017, at 12:15 PM, eiderman notifications@github.com wrote:

Which pretty tensor and which tensor flow version?

On Tue, Mar 28, 2017, 3:22 AM coderguanmingyang < notifications@github.com> wrote:

how can I slove the problem? I think the prettytensor is not fitted the tensorflow, because of the version.

` File "demo/demo.py", line 4, in import prettytensor as pt File "/usr/local/lib/python2.7/dist-packages/prettytensor/init.py", line 25, in from prettytensor import funcs File "/usr/local/lib/python2.7/dist-packages/prettytensor/funcs.py", line 25, in from prettytensor.pretty_tensor_image_methods import * File

"/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 135, in class conv2d(prettytensor.VarStoreMethod): File

"/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_image_methods.py", line 145, in conv2d bias=tf.zeros_initializer(),

TypeError: zeros_initializer() takes at least 1 argument (0 given)

@eiderman https://github.com/eiderman

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub < https://github.com/google/prettytensor/issues/43#issuecomment-289727288>, or mute the thread < https://github.com/notifications/unsubscribe-auth/ABnmwCFpTQdK19SUvW6s-El3EcHS3J1Fks5rqN9XgaJpZM4LVcUe

.

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

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/google/prettytensor/issues/43#issuecomment-289855626, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnmwMDkGL8xV1GvZ6n0qp3RpLd1ZUzqks5rqUxLgaJpZM4LVcUe .

coderguanmingyang commented 7 years ago

tf version

import tensorflow tensorflow.version '1.1.0-rc0'

prettytensor version

import prettytensor prettytensor.version '0.7.4'

yesterday I tried to change the prettytensor to some other versions,such as 0.7.3、0.7.2、0.7.1、 0.6.2,but all failed.

For example, 0.7.3 the error information is :

File "demo/demo.py", line 4, in import prettytensor as pt File "/usr/local/lib/python2.7/dist-packages/prettytensor/init.py", line 25, in from prettytensor import funcs File "/usr/local/lib/python2.7/dist-packages/prettytensor/funcs.py", line 27, in from prettytensor.pretty_tensor_methods import * File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_methods.py", line 714, in prettytensor.Register(tf.complex_abs) AttributeError: 'module' object has no attribute 'complex_abs' @eiderman

coderguanmingyang commented 7 years ago

what is the tickets?how to close the tickets? I am confused. thanks for reply~ @apiszcz