kweisamx / TensorFlow-VDSR

TensorFlow implementation of very deep convolution network for image super-resolution, color
https://arxiv.org/abs/1511.04587
MIT License
23 stars 16 forks source link

slice indices must be integers or None or have an __index__ method #1

Closed naseeresmael closed 6 years ago

naseeresmael commented 6 years ago

HI@kweisamx thank you for this great work when i try to train i got this error

VDSR-master> python main.py 2017-11-15 10:33:08.084160: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-11-15 10:33:08.084259: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. Traceback (most recent call last): File "main.py", line 33, in tf.app.run() # parse the command argument , the call the main function File "C:\Users\ABDO\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 30, in main vdsr.train(FLAGS) File "D:\VDSR-master\VDSR-master\model.py", line 67, in train nx, ny = input_setup(config) File "D:\VDSR-master\VDSR-master\utils.py", line 197, in input_setup sub_input_sequence, sub_label_sequence, nx, ny = make_sub_data(data, config) File "D:\VDSR-master\VDSR-master\utils.py", line 98, in make_subdata input, label, = preprocess(data[i], config.scale) # do bicbuic File "D:\VDSR-master\VDSR-master\utils.py", line 54, in preprocess label = modcrop(img, scale) File "D:\VDSR-master\VDSR-master\utils.py", line 37, in modcrop img = img[0:h, 0:w, :] TypeError: slice indices must be integers or None or have an index method

how could i solve this please.

kweisamx commented 6 years ago

Hi @naseeresmael , thank for your issue, may I ask your version of your numpy?

my numpy version is numpy==1.13.3

you can reference this link

naseeresmael commented 6 years ago

thanks for your quick reply Unfortunately my numpy version is numpy==1.13.3

Python 3.5.4

import numpy numpy.version.version '1.13.3'

downgrade to v 1.11.0 - 1.11.2 found new error ImportError: numpy.core.multiarray failed to import if i solve this any time i will let you know. thank you @kweisamx

kweisamx commented 6 years ago

@naseeresmael Maybe is python version, I use the python with Python 2 Thanks.

foralliance commented 6 years ago

Hi @naseeresmael
do u solve the problem "ImportError: numpy.core.multiarray failed to import"

kweisamx commented 6 years ago

Hi @foralliance , please change your python version with python2 try it