GithubHelp home page GithubHelp logo

mangalineextraction's People

Contributors

ljsabc avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mangalineextraction's Issues

how to use gpu when testing?

According to the content of the readme, I successfully run your method, but the default is to use CPU. How can use a GPU when testing?

Only layers of same output shape can be merged using sum mode and new problems

the same problem with the closed issue. after I tried the way in answer to solve this issue, new problems happened.
my environment is :anaconda3 python3.7
tf version is 1.14.0, keras version is 1.2.0 and my theano version is 0.9

the things I changed are:

  1. In erika.json, I replaced ""dim_ordering": "th" to "dim_ordering": "tf",
  2. replaced "axis=1" to "axis=3",
  3. input_dim is (null, null, null, 1) ( I don't think I find the right place to change this one )
  4. I converted weights.h5 to tf format, we only need transpose the convolution layer weights, for example: np.transpose(kernel, (3,2,1,0)). (and how to do this?)

and error comes into something different.
it confused me for days.
if someone know how to solve to solve this issue in this way or any other way plz answer and help
thx a lot!

Trainging code

Thanks for sharing the test code.

Do you plan to share the training code? I would like to train it on my own custom dataset.

AssertionError: AbstractConv2d Theano optimization failed

Thanks for sharing the good code.

  1. I created a new virtual env and installed all components.
  2. I modified keras.json as recommended.
    but some errors occurred when I ran, any one can help me? @ljsabc :
    ====================================
    Using Theano backend.
    WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain
    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python im
    plementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
    ./Arisa\Arisa_005.jpg
    ERROR (theano.gof.opt): Optimization failure due to: local_abstractconv_check
    ERROR (theano.gof.opt): node: AbstractConv2d{convdim=2, border_mode='half', subsample=(1, 1), filter_flip=True, imshp=(None, None, None, None), kshp=(24, 1, 3, 3), f
    ilter_dilation=(1, 1)}(Elemwise{add,no_inplace}.0, convolution2d_1_W)
    ERROR (theano.gof.opt): TRACEBACK:
    ERROR (theano.gof.opt): Traceback (most recent call last):
    File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 1982, in process_node
    replacements = lopt.transform(node)
    File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\tensor\nnet\opt.py", line 609, in local_abstractconv_check
    raise AssertionError(
    AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options. Did you exclude both "conv_dnn" and
    "conv_gemm" from the optimizer? If on GPU, is cuDNN available and does the GPU support it? If on CPU, do you have a BLAS library installed Theano can link against?

Traceback (most recent call last):
File "test_mse.py", line 85, in
test(sys.argv[1])
File "test_mse.py", line 65, in test
out = model.predict(patch, batch_size=batch_size)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\keras\engine\training.py", line 1216, in predict
self._make_predict_function()
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\keras\engine\training.py", line 748, in _make_predict_function
self.predict_function = K.function(inputs,
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\keras\backend\theano_backend.py", line 929, in function
return Function(inputs, outputs, updates=updates, **kwargs)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\keras\backend\theano_backend.py", line 912, in init
self.function = theano.function(inputs, outputs, updates=updates,
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\compile\function.py", line 315, in function
fn = pfunc(params=inputs,
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\compile\pfunc.py", line 483, in pfunc
return orig_function(inputs, cloned_outputs, mode,
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\compile\function_module.py", line 1788, in orig_function
fn = Maker(inputs,
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\compile\function_module.py", line 1474, in init
optimizer_profile = optimizer(fgraph)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 98, in call
return self.optimize(fgraph)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 87, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 235, in apply
sub_prof = optimizer.optimize(fgraph)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 87, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 2095, in apply
nb += self.process_node(fgraph, node)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 1985, in process_node
self.failure_callback(e, self,
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 1881, in warn_inplace
return NavigatorOptimizer.warn(exc, nav, repl_pairs, local_opt, node)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 1867, in warn
raise exc
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\gof\opt.py", line 1982, in process_node
replacements = lopt.transform(node)
File "D:\Anaconda3\envs\MangoLineExtraction\lib\site-packages\theano\tensor\nnet\opt.py", line 609, in local_abstractconv_check
raise AssertionError(
AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options. Did you exclude both "conv_dnn" and
"conv_gemm" from the optimizer? If on GPU, is cuDNN available and does the GPU support it? If on CPU, do you have a BLAS library installed Theano can link against?

Testing error

At the time of running the code I got this error. I have tensorflow==1.14.0 and keras ==1.2.0 and theno as 1.4.0

Traceback (most recent call last):
  File "test_mse.py", line 85, in <module>
    test(sys.argv[1])
  File "test_mse.py", line 51, in test
    model = loadModel(home)
  File "test_mse.py", line 44, in loadModel
    model = model_from_json(loaded_model_json)
  File "/home/ashish/anaconda3/lib/python3.7/site-packages/keras/models.py", line 210, in model_from_json
    return layer_from_config(config, custom_objects=custom_objects)
  File "/home/ashish/anaconda3/lib/python3.7/site-packages/keras/utils/layer_utils.py", line 38, in layer_from_config
    return layer_class.from_config(config['config'], custom_objects=custom_objects)
  File "/home/ashish/anaconda3/lib/python3.7/site-packages/keras/engine/topology.py", line 2575, in from_config
    process_layer(layer_data)
  File "/home/ashish/anaconda3/lib/python3.7/site-packages/keras/engine/topology.py", line 2572, in process_layer
    layer(input_tensors)
  File "/home/ashish/anaconda3/lib/python3.7/site-packages/keras/engine/topology.py", line 1450, in __call__
    node_indices, tensor_indices)
  File "/home/ashish/anaconda3/lib/python3.7/site-packages/keras/engine/topology.py", line 1329, in _arguments_validation
    'Layer shapes: %s' % input_shapes)
ValueError: Only layers of same output shape can be merged using sum mode. Layer shapes: [(None, 384, None, None), (None, 192, None, None)]

Only layers of same output shape can be merged using sum mode

Dear writer,
please tell me what's wrong in issue.I have run the code from yours without change but the result is workout.The process and error like this:
ZhonguodeMacBook-Pro:MangaLineExtraction-master zhonguoxu$ python3 test_mse.py ./Arise ./output
Using TensorFlow backend.
Traceback (most recent call last):
File "test_mse.py", line 85, in
test(sys.argv[1])
File "test_mse.py", line 51, in test
model = loadModel(home)
File "test_mse.py", line 44, in loadModel
model = model_from_json(loaded_model_json)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/models.py", line 210, in model_from_json
return layer_from_config(config, custom_objects=custom_objects)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/layer_utils.py", line 38, in layer_from_config
return layer_class.from_config(config['config'], custom_objects=custom_objects)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/engine/topology.py", line 2575, in from_config
process_layer(layer_data)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/engine/topology.py", line 2572, in process_layer
layer(input_tensors)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/engine/topology.py", line 1450, in call
node_indices, tensor_indices)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/engine/topology.py", line 1329, in _arguments_validation
'Layer shapes: %s' % input_shapes)
ValueError: Only layers of same output shape can be merged using sum mode. Layer shapes: [(None, 384, None, None), (None, 192, None, None)]
Thank you for attention!

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.