Coder Social home page Coder Social logo

import error about prettytensor HOT 13 CLOSED

google avatar google commented on September 26, 2024
import error

from prettytensor.

Comments (13)

eiderman avatar eiderman commented on September 26, 2024 1

from prettytensor.

eiderman avatar eiderman commented on September 26, 2024

from prettytensor.

codesteller86 avatar codesteller86 commented on September 26, 2024

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'

from prettytensor.

eiderman avatar eiderman commented on September 26, 2024

from prettytensor.

codesteller86 avatar codesteller86 commented on September 26, 2024

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?

from prettytensor.

YutingZhang avatar YutingZhang commented on September 26, 2024

Hi @eiderman,

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

Thanks!

from prettytensor.

eiderman avatar eiderman commented on September 26, 2024

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

from prettytensor.

YutingZhang avatar YutingZhang commented on September 26, 2024

@eiderman Thank you so much! It is working.

from prettytensor.

coderguanmingyang avatar coderguanmingyang commented on September 26, 2024

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

from prettytensor.

apiszcz avatar apiszcz commented on September 26, 2024

from prettytensor.

eiderman avatar eiderman commented on September 26, 2024

from prettytensor.

coderguanmingyang avatar coderguanmingyang commented on September 26, 2024

#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

from prettytensor.

coderguanmingyang avatar coderguanmingyang commented on September 26, 2024

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

from prettytensor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.