Code Monkey home page Code Monkey logo

tensorflow-vdsr's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorflow-vdsr's Issues

cannot assign a design for operation 'shared model/conv_20_b'

I run the Test.py with your model and met a problem tensorflow.python.framework.errors_impl.invalidargumenterror : cannot assign a design for operation 'shared model/conv_20_b', I use the python3.5 and tensorflow 1.4.1 ,I wonder if the version cause this problem

Generating Image from Model

I am trying the following to generate a color image from the model.

`im = Image.fromarray((img_vdsr_y * 255).astype(np.uint8))

imycbcr = im.convert("YCbCr")

(y, cb, cr) = imycbcr.split()

origimage = Image.open(originalFilePath)

origimage = origimage.resize((input_y.shape[1], input_y.shape[0]), Image.ANTIALIAS)

origycbcr = origimage.convert('YCbCr')

(yO, cbO, crO) = origycbcr.split()

finalImage = Image.merge('YCbCr', (y, cbO, crO))
`

The resulting image is a color image, but the quality is worse than the original and it has random black pixels throughout. Does anyone know a better way to take the ndarray img_vdsr_y and combine that with the cb and cr channels from the original image?

Error in testing

I am trying to replicate the results on test Set5 and Set14. I downloaded the checkpoint file given and the test sets and also ran aug_test.m. But on running TEST.py I am getting the following error:

Traceback (most recent call last): File "TEST.py", line 88, in <module> test_VDSR_with_sess(80, model_ckpt, DATA_PATH,sess) File "TEST.py", line 49, in test_VDSR_with_sess saver.restore(sess, ckpt_path) File "/home/lakshya/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1388, in restore {self.saver_def.filename_tensor_name: save_path}) File "/home/lakshya/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run run_metadata_ptr) File "/home/lakshya/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run feed_dict_string, options, run_metadata) File "/home/lakshya/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run target_list, options, run_metadata) File "/home/lakshya/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "shared_model/conv_00_w" not found in checkpoint files ./checkpoints/VDSR_norm_0.01_epoch_066.ckpt-16820 [[Node: save/RestoreV2_1 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_1/tensor_names, save/RestoreV2_1/shape_and_slices)]] [[Node: save/RestoreV2_8/_61 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_183_save/RestoreV2_8", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]

How can I replicate the results?

is it required GPU for running?

when i run the script below:
$ python VDSR.py --model_path ./checkpoints/VDSR_adam_epoch_016.ckpt-57188

result:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'shared_model/conv_20_b': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.

Unable to perform normal training

When I use python VDSR.py training, only the following lines appear, and then paused, can you help me see it, thank you
stopping... 0 integer division or modulo by zero
stopping... 1 integer division or modulo by zero
stopping... 2 integer division or modulo by zero
stopping... 3 integer division or modulo by zerostopping... 4 integer division or modulo by zero

stopping... 5 integer division or modulo by zero
stopping... 6 integer division or modulo by zerostopping... 7
integer division or modulo by zero
stopping... 8 integer division or modulo by zero
stopping... 9 integer division or modulo by zero
stopping... 10 integer division or modulo by zero
stopping... 11 integer division or modulo by zero
stopping... 12 integer division or modulo by zero
stopping... 13 integer division or modulo by zero
stopping... 14 integer division or modulo by zero
stopping... 15 stopping... integer division or modulo by zero16
integer division or modulo by zero
stopping... 17 integer division or modulo by zero
stopping... 18 integer division or modulo by zero
num thread: 20stopping... 19 integer division or modulo by zero

Training time problem

Hello, the checkpoint that your provided was trained by the default parameters in the code?
The paper says that network training is done within 4 hours, but I use GTX 1080 and Cuda 8.0, it seem that need several days.

How many times do you need for training?

Hi,

Here are my training parameters,
size: 41 x 41
batch_size: 64
step: 100000

write summary every 1000 steps.

Every step needs 3-4 seconds with a 1080Ti. The entire training maybe need 3 or 4 days. Dose this feel right? The writer of the paper (VDSR) just need 4 hours for training...

make_template('shared_model',model)

Hi,
I have a question about shared_model = tf.make_template('shared_model', model) in line 104 in the VDSR.py. Is this operation have some advantages? thank you very much!
And the second question is whether the way of data_reading in your code can replace the way of tfrecords?

question about network

Hi, I search in your code, I found there seems no deconv and subpixel layer for upsample. could you point the upsample module

Its for colored Images? Also I am getting some weird PSNR values

I want to ask following two questions:

  1. Have you implemented it for gray-scale images? (seems so from network architecture in "MODEL" file)

  2. I have ran your model, using checkpoint file you shared on github (VDSR_adam_epoch_016.ckpt-57188), but it gives me higher PSNR values in comparison to ones mentioned in READ.md file (see attached screenshot). I am bit confused if I am understanding something wrong or whats wrong that I am not getting the reported values.
    screenshot from 2017-06-13 11 36 16

Is the file extension missed in aug_train.m?

Hi,

I noticed that train files were save in formart 'aug/%d' in aug_train.m.
However, in VDSR.py, the train_list was generated by scan '.mat' files. So I wondered whether one of them was wrong?

I did not have matlab installed, I employed octave to run the .m file.

How do I get an RGB image after testing

During the training, I only trained Y channel, but did not synthesize it into RGB at the end of the training. Could you give me some Suggestions on how to change it

How long does it take to train a new model?

I have test the code OK with the 'VDSR_adam_epoch_016.ckpt-57188' model provided. However, I have some problem in training a new model.

My question is that it seems take long time to train a new model when I ran VSDR. Unfortunately, I kill the procedure before it returns a new model for me. My test configurations are as follows:
windows7+cuda8.0+nvidia Geforce 740M

Would you please share some information about the training process?

PLOT unexpected behavior

If you run TEST on two different test datasets using two different checkpoints (say, you run dataset 1 on checkpoints after 15 and 20 epochs and run dataset 2 on checkpoints after 0 and 30 epochs), then PLOT will correctly only append the relevant checkpoint results to each dataset. However, this leads to the behavior of the number which is played NOT matching up with the correct checkpoint.

e.g. np.argmax(vdsr_mean_2) would probably give (1, 1, 1) as the max for both dataset 1 and dataset 2 but it should give (1, 1, 1) and then (3, 3, 3).

Any simple fixes?

Something wrong with test code

image
Traceback (most recent call last):
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _do_call
return fn(*args)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1003, in _run_fn
status, run_metadata)
File "D:\python351\lib\contextlib.py", line 66, in exit
next(self.gen)
File "D:\python351\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file .\checkpoints\VDSR_adam_epoch_000.ckpt-3364.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2_31 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_31/tensor_names, save/RestoreV2_31/shape_and_slices)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:/Machine_Learning/Tensorflow_Code/example_code/tensorflow-vdsr-master/TEST.py", line 94, in
test_VDSR_with_sess(80, model_ckpt, DATA_PATH,sess)
File "E:/Machine_Learning/Tensorflow_Code/example_code/tensorflow-vdsr-master/TEST.py", line 50, in test_VDSR_with_sess
saver.restore(sess, ckpt_path)
File "D:\python351\lib\site-packages\tensorflow\python\training\saver.py", line 1388, in restore
{self.saver_def.filename_tensor_name: save_path})
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file .\checkpoints\VDSR_adam_epoch_000.ckpt-3364.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2_31 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_31/tensor_names, save/RestoreV2_31/shape_and_slices)]]

Caused by op 'save/RestoreV2_31', defined at:
File "E:/Machine_Learning/Tensorflow_Code/example_code/tensorflow-vdsr-master/TEST.py", line 86, in
saver = tf.train.Saver(weights)
File "D:\python351\lib\site-packages\tensorflow\python\training\saver.py", line 1000, in init
self.build()
File "D:\python351\lib\site-packages\tensorflow\python\training\saver.py", line 1030, in build
restore_sequentially=self._restore_sequentially)
File "D:\python351\lib\site-packages\tensorflow\python\training\saver.py", line 624, in build
restore_sequentially, reshape)
File "D:\python351\lib\site-packages\tensorflow\python\training\saver.py", line 361, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File "D:\python351\lib\site-packages\tensorflow\python\training\saver.py", line 200, in restore_op
[spec.tensor.dtype])[0])
File "D:\python351\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 441, in restore_v2
dtypes=dtypes, name=name)
File "D:\python351\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 759, in apply_op
op_def=op_def)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 1128, in init
self._traceback = _extract_stack()

DataLossError (see above for traceback): Unable to open table file .\checkpoints\VDSR_adam_epoch_000.ckpt-3364.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2_31 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_31/tensor_names, save/RestoreV2_31/shape_and_slices)]]

I have run train code ,but I just run here "[epoch 1.0101] loss 1.3370 lr 0.00001" . This process cost me 20 hours with cpu , I have to stop it.
Sorry to copy too much information . I am a new learner on SR and TensorFlow , maybe some simple problem occurred but I can't find it . How can I fix this problem ? Thanks your answer very much ~

Why gradient clipping is removed?

  1. Why all the source code related to gradient clipping in VDSR.py in 8b59484fea473d35acfa6f0788739e5888dc437a is removed from master branch? Is it not working?

capped_gvs = [(tf.clip_by_norm(grad, norm), var) for grad, var in gvs]

  1. In addition, I have seen that you are trying to divide learning rate by 10 for each iteration when USE_QUEUE_LOADING is enabled, i.e.
    lrr = lrr/10

    but do not re-calculate the norm for gradient clipping when USE_QUEUE_LOADING is disabled. Please can you kindly explain why is the case?

Many thanks!

Cannot replicate the layer tensor values

I have tested the code with the 'VDSR_adam_epoch_016.ckpt-57188' provided and it worked well. However, when I trained it from scratch, I noticed that the tensor values of each layer are not equal to those in the provided checkpoint. I performed the training using the 291 data set and used the parameters given in VDSR.py (e.g. LR_RATE = 0.2, and BASE_LR = 0.00001, etc.).

Do you have any insights as to why this happened?

Issue in Python 2.7 and Tensorflow

Hi,

I'm trying to run this project on Windows 10 system.
The codes were written on python 2.
The problem start here...
On the installation page of tensorflow, the support python are 3.5 or 3.6.

How can i run the train code on python 2.7 and using tensorflow on Windows 10?

Thanks!

Test and train errors

I test your uploaded model ''VDSR_adam_epoch_016.ckpt-57188'' by 'TEST.py', but the following error occurs
"NotFoundErrors: Unsucessful TensorSliceReader construcator: Failed to find any matching files for VDSR_adam_epoch_016.ckpt-57188'"
I retrain the network by”VDSR.py" and test the all the ckpts, the best psnr is 29.10 which id much samller than your results(29.67). my VDSR_adam_epoch_016.ckpt-57188 is 29.08
my tensorflow version is 1.0.
I am confused about the above questions.

Problem about calculate PSNR

Hi, I have a question about calculating PSNR. When calculating the PSNR,why it removes the margin in your code? Is there any paper to mentioned it that use this way to calculate. If you know, please tell me which paper, thank you very much!

`target_data = target_data[scale:-scale, scale:-scale]

ref_data = np.array(ref)

ref_data = ref_data[scale:-scale, scale:-scale]`

Timing

Would you be able to comment on how fast your implementation is for upscaling? How long do you need to upscale any of the test set images?

Multi-threading

When I run VDSR.py, it prints num thread :0. Does it mean I can't use multithreading? Because I have GTX750 Ti and training time takes almost 55 hours.

Question about the loss computation

Hello, I just checking training process in my case.
So, I look in the loss computation for weight decay term:
for w in weights: loss += tf.nn.l2_loss(w)*1e-4
this is always about 0.002 in my case.
Are you shure that this computation is correct?

the question of time

Have you ever used a GPU to test the time ,super-resolution with different sizes of images, the speed will be significantly slower, the same size of the image,the speed will be very fast

时间问题

你好,您有没有在GPU下测试时间,发现一个问题,当输入大小变化时,速度会慢很多

Didn't reproduce the result

I run you code, but i didn't reproduce the result. I use Tensorflow 0.12 with CUDA8, but there something run in your code, i just do a simple modification to make it run.
I finally got the PSNR value on Set5 and Set14, far below the value of your paper.
On Set5:

x2 6 33.6565127209
x3 10 30.380419877
x4 10 28.3931595153

On Set14:

x2 6 30.2294985089
x3 102 27.5454416367
x4 6 26.0019467506

It's there anything wrong? Thanks

PSNR values do not cross bicubic PSNR

Hi,

I am using aug_train.m on the 91 image dataset to generate the image patches for training. I have set the base LR as 0.1 and the base NORM is set to 0.2. My issue is that the VDSR PSNR never seems to cross the bicubic PSNR values.

I have tried the following combinations

  1. LR = 0.1 and decrease LR by a factor of 10 after every 20 epochs
  2. LR = 0.1 and decrease LR by a factor of 10 after every 20 epochs and increase norm by a factor of 10 as well
    In both cases I have reached about 60 epochs and a learning rate of 0.0001 and the PSNR on Set 5 never seems to grow higher than the Bicubic PSNR

Could you tell me what version of python (tensorflow) you are using?

I am having some problems while running the code.
the erros is:
UnknownError (see above for traceback): Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[node shared_model/Conv2D (defined at /projects/tensorflow-vdsr/MODEL.py:14) ]] [[node add_39 (defined at VDSR.py:110) ]]

The environment is :
python==2.7
tensorflow-gpu==1.12.1
cuda==9.0
cudnn==7.0.5

Thanks!

What does "LR_STEP_SIZE" use for?

Hi,

I'm doubting that in VDSR.py #113, if the args staircase=True,the exp_decay won't work forever.

The exp_decay can be calculated as:
decay_learning_rate = learning_rate * decay_rate ^ (global_step / decay_steps)

But in code "VDSR.py line#113", the global_step is calculated as global_step*BATCH_SIZE, decay_steps is calculate aslen(train_list)*LR_STEP_SIZE

Why decay_steps not to be len(train_list).Why should it multiply LR_STEP_SIZE??

Look forward to your kind reply.

If I want to run for input size 128x128

If I wanted to run VDSR (with adam.. without gradient clipping and all) for input size of 128x128 to get a super resolved output with scale 2 (256x256).
How should I go about it?
I mean, can someone give me an idea about the number of epochs, weightDecay, momentum values and learning rates required?

Wrong image

Hi,

Don't you think this line from model.py

	tensor = tf.add(tensor, input_tensor)

Requires a divide by 2 operation

	tensor = tf.add(tensor, input_tensor)/2

?

Dose the code run on GPU?Something wrong occurred when I run the code

The running result is as flowing:

D:\python351\python.exe "E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py"
287088
71772
use queue loading
WARNING:tensorflow:From E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py:142 in .: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use tf.global_variables_initializer instead.
Traceback (most recent call last):
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _do_call
return fn(*args)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 999, in _run_fn
self._extend_graph()
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1048, in _extend_graph
self._session, graph_def.SerializeToString(), status)
File "D:\python351\lib\contextlib.py", line 66, in exit
next(self.gen)
File "D:\python351\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device to node 'shared_model/conv_20_b/Adam_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
Colocation Debug Info:
Colocation group had the following types and devices:
Variable: CPU
Identity: CPU
Const: CPU
Assign: CPU
ApplyAdam: CPU
[[Node: shared_model/conv_20_b/Adam_1 = Variable_class=["loc:@shared_model/conv_20_b"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py", line 142, in
tf.initialize_all_variables().run()
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 1449, in run
_run_using_default_session(self, feed_dict, self.graph, session)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 3668, in _run_using_default_session
session.run(operation, feed_dict)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device to node 'shared_model/conv_20_b/Adam_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
Colocation Debug Info:
Colocation group had the following types and devices:
Variable: CPU
Identity: CPU
Const: CPU
Assign: CPU
ApplyAdam: CPU
[[Node: shared_model/conv_20_b/Adam_1 = Variable_class=["loc:@shared_model/conv_20_b"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]]

Caused by op 'shared_model/conv_20_b/Adam_1', defined at:
File "E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py", line 121, in
opt = optimizer.minimize(loss, global_step=global_step)
File "D:\python351\lib\site-packages\tensorflow\python\training\optimizer.py", line 279, in minimize
name=name)
File "D:\python351\lib\site-packages\tensorflow\python\training\optimizer.py", line 393, in apply_gradients
self._create_slots(var_list)
File "D:\python351\lib\site-packages\tensorflow\python\training\adam.py", line 120, in _create_slots
self._zeros_slot(v, "v", self._name)
File "D:\python351\lib\site-packages\tensorflow\python\training\optimizer.py", line 593, in _zeros_slot
named_slots[var] = slot_creator.create_zeros_slot(var, op_name)
File "D:\python351\lib\site-packages\tensorflow\python\training\slot_creator.py", line 108, in create_zeros_slot
colocate_with_primary=colocate_with_primary)
File "D:\python351\lib\site-packages\tensorflow\python\training\slot_creator.py", line 86, in create_slot
return _create_slot_var(primary, val, scope)
File "D:\python351\lib\site-packages\tensorflow\python\training\slot_creator.py", line 50, in _create_slot_var
slot = variables.Variable(val, name=scope, trainable=False)
File "D:\python351\lib\site-packages\tensorflow\python\ops\variables.py", line 224, in init
expected_shape=expected_shape)
File "D:\python351\lib\site-packages\tensorflow\python\ops\variables.py", line 343, in _init_from_args
name=name)
File "D:\python351\lib\site-packages\tensorflow\python\ops\state_ops.py", line 163, in variable_op
container=container, shared_name=shared_name)
File "D:\python351\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 686, in _variable
name=name)
File "D:\python351\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 759, in apply_op
op_def=op_def)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 1128, in init
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Cannot assign a device to node 'shared_model/conv_20_b/Adam_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
Colocation Debug Info:
Colocation group had the following types and devices:
Variable: CPU
Identity: CPU
Const: CPU
Assign: CPU
ApplyAdam: CPU
[[Node: shared_model/conv_20_b/Adam_1 = Variable_class=["loc:@shared_model/conv_20_b"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]]

I do not know what's wrong with the code or my computer.My system is WIN 7 64 bit,Python 3.5.1,Tensorflow 0.12,CPU type.

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.