medal-iitb / fast_wsi_color_norm Goto Github PK
View Code? Open in Web Editor NEWCodes for Fast GPU-Enabled Color Normalization of Whole Slide Images in Digital Pathology
Codes for Fast GPU-Enabled Color Normalization of Whole Slide Images in Digital Pathology
Hello,Thanks for your softmax.
When I run the code with cpu, there is ok.
But I run che code with GPU, there is a error occur.
2019-06-25 05:41:56.794418: E tensorflow/stream_executor/cuda/cuda_blas.cc:654] failed to run cuBLAS routine cublasSgemm_v2: CUBLAS_STATUS_EXECUTION_FAILED
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1327, in _do_call
return fn(*args)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1312, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1420, in _call_tf_sessionrun
status, run_metadata)
File "/root/anaconda3/lib/python3.6/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: Blas xGEMM launch failed : a.shape=[1,77439,3], b.shape=[1,3,2], m=77439, n=2, k=3
[[Node: MatMul = BatchMatMul[T=DT_FLOAT, adj_x=false, adj_y=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](sub, transpose)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 165, in
run_batch_colornorm(filenames,nstains,lamb,output_dir,level,background_correction,config)
File "/cptjack/totem/Fast_WSI_Color_Norm/Run_ColorNorm.py", line 170, in run_batch_colornorm
Hiv=session1.run(Hiv1,feed_dict={Img1:img, Wis1: Wi,src_i_0:i0})
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 905, in run
run_metadata_ptr)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1140, in _run
feed_dict_tensor, options, run_metadata)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1321, in _do_run
run_metadata)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1340, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Blas xGEMM launch failed : a.shape=[1,77439,3], b.shape=[1,3,2], m=77439, n=2, k=3
[[Node: MatMul = BatchMatMul[T=DT_FLOAT, adj_x=false, adj_y=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](sub, transpose)]]
Caused by op 'MatMul', defined at:
File "main.py", line 165, in
run_batch_colornorm(filenames,nstains,lamb,output_dir,level,background_correction,config)
File "/cptjack/totem/Fast_WSI_Color_Norm/Run_ColorNorm.py", line 69, in run_batch_colornorm
Hiv1 = tf.nn.relu(tf.matmul(V,Wi_inv))
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 2071, in matmul
a, b, adj_x=adjoint_a, adj_y=adjoint_b, name=name)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 1236, in batch_mat_mul
"BatchMatMul", x=x, y=y, adj_x=adj_x, adj_y=adj_y, name=name)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3290, in create_op
op_def=op_def)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1654, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InternalError (see above for traceback): Blas xGEMM launch failed : a.shape=[1,77439,3], b.shape=[1,3,2], m=77439, n=2, k=3
[[Node: MatMul = BatchMatMul[T=DT_FLOAT, adj_x=false, adj_y=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](sub, transpose)]]
Hi,
thank you for the implementation, I will maybe test it in my project. While your paper shows interesting results regarding speed-up, you describe the code as "usable right out of the box". This is not true with the current documentation and code structure.
I would suggest:
Otherwise, the quality of the code invokes no confidence in the quality of its results.
Best wishes
Hi, could you to make a setup.py file to simplify installing?
All code has python2 specific calls, specially a large number of print statements of python2 style. As Python2 support is ending soon, it seems important for the code to be Python3 compatible.
I'm sending a PR with all code made python3 compatible.
Thank you for writing this software.
I want to normalize a folder of svs files, based on one target, so I am using op = 3
.
How do I make sure my GPU is being used because it seems to be very slow.
Secondly, nothing gets saved to my output directoy.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.