i am getting can not import name 'model_train'
See original GitHub issueC:\Users\Dell\Desktop\text-detection-ctpn-banjin-dev\main>demo.py
Traceback (most recent call last):
File "C:\Users\Dell\Desktop\text-detection-ctpn-banjin-dev\main\demo.py", line 13, in <module>
from nets import model_train as model
ImportError: cannot import name 'model_train'
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
ImportError: cannot import name convert_all_kernels_in_model
python.keras imports with tensorflow.keras in ImageAI library. After this, from imageai.Prediction.Custom import ModelTraining import works fine ...
Read more >ImportError: cannot import name convert_all_kernels_in_model
I am trying to use ImageAI's model training to train an AI model. This is the code: from imageai.Prediction.Custom import ModelTraining model_trainer ...
Read more >ImportError cannot import name train test split from sklearn ...
I am trying to use train_test_split module, but it shows me the bellow error. $ from sklearn.linear_model import train_test_split ImportError ...
Read more >import "tensorflow.keras" could not be resolved - You.com
Hi, I am trying to use image augmentation and getting this issue. Although codes are running, data is not being augmented. Do you...
Read more >Source code for torchvision.models.feature_extraction - PyTorch
The resulting graph ends up having single nodes referencing calls to the leaf modules' forward ... Module, module_qualname: str) -> bool: if isinstance(m, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So after facing the same error, I figured out what was being done wrong. The problem is due to the fact that you are running
demo.py
from themain
folder. Python tries to find model_train.py in the tensorflow/models/research/slim PATH.There is a folder named
nets
in text-detection-ctpn folder which contains model_train.py. So the correct way of running the program is from text-detection-ctpn folder as stated in the Readme.Just run -> python ./main/demo.py
@sinny777 I resolved this error, just play a bit with file location and you could be able to solve this. I’m sorry, I’m not able to provide you a more precise answer x’)