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

TypeError: unsupported operand type(s) for /: 'NoneType' and 'float' AND AttributeError: module 'tensorflow' has no attribute 'placeholder' #9

Open
shotXD opened this issue Apr 13, 2020 · 1 comment

Comments

@shotXD
Copy link

shotXD commented Apr 13, 2020

after executing gen.py and train.py it creates a couple of files generated in test folder but gives following error. Please help.

python3 gen.py

test/00000000_LTL8260_0.jpg
test/00000001_YGP2593_1.jpg
Traceback (most recent call last):
File "gen.py", line 284, in
for img_idx, (im, c, p) in enumerate(im_gen):
File "gen.py", line 275, in generate_ims
yield generate_im(font_char_ims[random.choice(fonts)], num_bg_images)
File "gen.py", line 230, in generate_im
bg = generate_bg(num_bg_images)
File "gen.py", line 217, in generate_bg
bg = cv2.imread(fname, 0) / 255.
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'


python3 train.py
Train start! 2020-04-14 00:11:01
Traceback (most recent call last):
File "train.py", line 251, in
initial_weights=initial_weights)
File "train.py", line 156, in train
x, y, params = model.get_training_model()
File "/home/utsav/Downloads/LPR ALL/ANPR-Tensorflow/anpr/model.py", line 103, in get_training_model
x, conv_layer, conv_vars = convolutional_layers()
File "/home/utsav/Downloads/LPR ALL/ANPR-Tensorflow/anpr/model.py", line 66, in convolutional_layers
x = tf.placeholder(tf.float32, [None, None, None])
AttributeError: module 'tensorflow' has no attribute 'placeholder'

@shotXD shotXD changed the title TypeError: unsupported operand type(s) for /: 'NoneType' and 'float' TypeError: unsupported operand type(s) for /: 'NoneType' and 'float' AND AttributeError: module 'tensorflow' has no attribute 'placeholder' Apr 13, 2020
@pendex900x
Copy link

!pip install matplotlib==2.1.2
!pip install opencv-python==3.1.0.5
!pip install Pillow==5.3.0
!pip install numpy==1.14.4

!python -m pip install --upgrade tensorflow==1.8.0

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