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

change dataset and error comes #20

Open
pennywei opened this issue Apr 30, 2019 · 4 comments
Open

change dataset and error comes #20

pennywei opened this issue Apr 30, 2019 · 4 comments

Comments

@pennywei
Copy link

I have been running the code with the mnist successfully.But when I converted the dataset into 10000 64*64-size pictures of myself,the problem arose.
Embeddings which I use have dimensionality of 10.
Thank you.
Here is the errors:

2019-04-30 16:22:42.154842: I C:\Users\User\Source\Repos\tensorflow\tensorflow\core\kernels\cuda_solvers.cc:159] Creating CudaSolver handles for stream 00000233B3D591D0
2019-04-30 16:22:42.680676: W C:\Users\User\Source\Repos\tensorflow\tensorflow\core\framework\op_kernel.cc:1202] OP_REQUIRES failed at topk_op.cc:92 : Internal: Could not launch TopKKernel: invalid configuration argument.
Traceback (most recent call last):
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1361, in _do_call
return fn(*args)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1340, in _run_fn
target_list, status, run_metadata)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 516, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InternalError: Could not launch TopKKernel: invalid configuration argument.
[[Node: TopKV2 = TopKV2[T=DT_FLOAT, sorted=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Neg, TopKV2/k)]]
[[Node: ortho_weights_update/_1413 = _Recv_start_time=0, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_602_ortho_weights_update", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/pycharm project/SpectralNet-master - 副本/src/applications/run.py", line 206, in
x_spectralnet, y_spectralnet = run_net(data, params)
File "D:\pycharm project\SpectralNet-master - 副本\src\applications\spectralnet.py", line 95, in run_net
params['spec_ne'])
File "D:\pycharm project\SpectralNet-master - 副本\src\core\networks.py", line 166, in train
batches_per_epoch=100)[0]
File "D:\pycharm project\SpectralNet-master - 副本\src\core\train.py", line 92, in train_step
return_vars_ += np.asarray(K.get_session().run(all_vars, feed_dict=feed_dict)[:len(return_var)])
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 905, in run
run_metadata_ptr)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1137, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1355, in _do_run
options, run_metadata)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1374, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Could not launch TopKKernel: invalid configuration argument.
[[Node: TopKV2 = TopKV2[T=DT_FLOAT, sorted=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Neg, TopKV2/k)]]
[[Node: ortho_weights_update/_1413 = _Recv_start_time=0, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_602_ortho_weights_update", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

Caused by op 'TopKV2', defined at:
File "D:/pycharm project/SpectralNet-master - 副本/src/applications/run.py", line 206, in
x_spectralnet, y_spectralnet = run_net(data, params)
File "D:\pycharm project\SpectralNet-master - 副本\src\applications\spectralnet.py", line 90, in run_net
params['n_nbrs'], batch_sizes, siamese_net, x_train, len(x_train_labeled))
File "D:\pycharm project\SpectralNet-master - 副本\src\core\networks.py", line 112, in init
W = costs.knn_affinity(input_affinity, n_nbrs, scale=scale, scale_nbr=scale_nbr)
File "D:\pycharm project\SpectralNet-master - 副本\src\core\costs.py", line 62, in knn_affinity
nn = tf.nn.top_k(-Dx, n_nbrs, sorted=True)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 2308, in top_k
return gen_nn_ops._top_kv2(input, k=k, sorted=sorted, name=name)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 5438, in _top_kv2
"TopKV2", input=input, k=k, sorted=sorted, name=name)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3271, in create_op
op_def=op_def)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1650, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InternalError (see above for traceback): Could not launch TopKKernel: invalid configuration argument.
[[Node: TopKV2 = TopKV2[T=DT_FLOAT, sorted=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Neg, TopKV2/k)]]
[[Node: ortho_weights_update/_1413 = _Recv_start_time=0, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_602_ortho_weights_update", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

@harukou
Copy link

harukou commented May 15, 2019

Hey, Can you tell me your tensorflow version? I can not repeat the program when using mnist dataset.

@lihenryhfl
Copy link
Collaborator

Which tensorflow version are both of you using? I have tested it to work up to tf1.13

@harukou
Copy link

harukou commented May 16, 2019

Which tensorflow version are both of you using? I have tested it to work up to tf1.13

Thanks for replying. My tensorflow is v1.13.1. This is my re-install version and it worked. The version I have used is also v1.13.1 but it never worked.
So, it is the problem of tensorflow.

@pennywei
Copy link
Author

Which tensorflow version are both of you using? I have tested it to work up to tf1.13

Thanks for replying.My tf is v1.6.0.
mnist dataset run successfully, but the problem arose when I run my own dataset

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

3 participants