question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use CRNN with Theano backend

See original GitHub issue

Hi,

Do you know if the pre-trained CRNN model works for any combination of library versions? I’ve tried tensorflow, but I have seen another issue here saying that it is impossible to load tensorflow weights. I’m using Keras 1.2.0 and Theano 0.9.0 and I’m getting the following error output during model.predict():

ValueError: GpuReshape: trying to reshape an array of total size 1440 into an array of total size 96. Apply node that caused the error: GpuReshape{4}(bn_0_freq_running_mean, TensorConstant{[ 1 1 96 1]}) Toposort index: 39 Inputs types: [GpuArrayType<None>(float32, (False,)), TensorType(int64, vector)] Inputs shapes: [(1440,), (4,)] Inputs strides: [(4,), (8,)] Inputs values: ['not shown', array([ 1, 1, 96, 1])] Outputs clients: [[GpuElemwise{sub,no_inplace}(GpuIncSubtensor{Set;::, ::, int64:int64:, int64:int64:}.0, GpuReshape{4}.0)]]

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:27 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
franciscoaraposocommented, Oct 8, 2017

Hi, Yes it works, in the sense that it does not crash. But, in that same sense, axis=freq and mode=1 also works (at least during prediction). However, since I want to use the pre-trained model, I should use axis=time and mode=0 since I guess that was how the code was at the time you trained the model. Is that correct?

0reactions
thuyduong991234commented, Jan 4, 2021

I have use Theano (0.8.2)&Keras (1.1.0) and got the same error on example_tagging , what should i do to make it work?

You should do:

  1. git checkout a399872
  2. Fix some error that can occur (google has answers)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · keunwoochoi/music-auto_tagging-keras · GitHub
Music auto-tagging models and trained weights in keras/theano - Issues · keunwoochoi/music-auto_tagging-keras. ... Cannot use CRNN with Theano backend.
Read more >
How to switch Backend with Keras (from TensorFlow to Theano)
The provided answers should work if you can import backend, but if not, just use: import os os.environ['KERAS_BACKEND'] = 'theano' import keras ...
Read more >
Change Keras backend to Theano - YouTube
In this video, we discuss and show the necessary steps to change Keras to use Theano as its backend. DEEPLIZARD COMMUNITY RESOURCES ...
Read more >
How to Use the TimeDistributed Layer in Keras
This tutorial assumes a Python 2 or Python 3 development environment with SciPy, NumPy, and Pandas installed. The tutorial also assumes scikit- ...
Read more >
Keras Backend - Tensorflow and Theano - DataFlair
In this article, we will study two of the most commonly used Keras backends i.e TensorFlow and theano. This article will explain how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found