Giter Club home page Giter Club logo

wusaifei / hwcc_image_classification Goto Github PK

View Code? Open in Web Editor NEW
79.0 79.0 31.0 52 KB

本赛题任务是对西安的热门景点、美食、特产、民俗、工艺品等图片进行分类,即首先识别出图片中物品的类别(比如大雁塔、肉夹馍等),然后根据图片分类的规则,输出该图片中物品属于景点、美食、特产、民俗和工艺品中的哪一种。

License: GNU General Public License v3.0

Python 100.00%

hwcc_image_classification's Introduction

hwcc_image_classification's People

Contributors

saifeiwu avatar wusaifei 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

Watchers

 avatar  avatar  avatar

hwcc_image_classification's Issues

修改为torch.save(net.module(),那行后又出现新的问题

Traceback (most recent call last):
File "/data/work/python_project/HWCC_image_classification/src/train.py", line 216, in
main()
File "/data/work/python_project/HWCC_image_classification/src/train.py", line 201, in main
torch.save(net.module(), '%s/net_%03d.pth' % (args.outf, epoch + 1))
File "/data/work/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'inputs'

在华为云部署模型时报错AttributeError: Can't get attribute 'MemoryEfficientSwish' on

[2019-12-24 12:45:34 +0000] [17] [INFO] Starting gunicorn 19.8.1
[2019-12-24 12:45:34 +0000] [17] [INFO] Starting gunicorn 19.8.1
[2019-12-24 12:45:34 +0000] [17] [INFO] Listening at: http://0.0.0.0:8080 (17)
[2019-12-24 12:45:34 +0000] [17] [INFO] Using worker: sync
[2019-12-24 12:45:34 +0000] [20] [INFO] Booting worker with pid: 20
[2019-12-24 12:45:38 +0000] [20] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
import(module)
File "/home/mind/app.py", line 144, in
model_service = class_defs[0](model_name, model_path)
File "/home/mind/model/customize_service.py", line 29, in init
self.model = torch.load(model_path, map_location=map_location)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 574, in _load
result = unpickler.load()
AttributeError: Can't get attribute 'MemoryEfficientSwish' on

在华为云部署customize_service.py报错AttributeError: 'collections.OrderedDict' object has no attribute 'eval'

[2019-12-23 13:45:22 +0000] [20] [INFO] Worker exiting (pid: 20)
Namespace(model_name='serve', model_path='/home/mind/model/net_011.pth', pt_server_name='127.0.0.1', service_file='/home/mind/model/customize_service.py')
model_name: serve
model_path: /home/mind/model/net_011.pth
[2019-12-23 13:45:23 +0000] [17] [INFO] Shutting down: Master
[2019-12-23 13:45:23 +0000] [17] [INFO] Reason: Worker failed to boot.
[2019-12-23 13:46:48 +0000] [17] [INFO] Starting gunicorn 19.8.1
[2019-12-23 13:46:48 +0000] [17] [INFO] Listening at: http://0.0.0.0:8080 (17)
[2019-12-23 13:46:48 +0000] [17] [INFO] Using worker: sync
[2019-12-23 13:46:48 +0000] [20] [INFO] Booting worker with pid: 20
[2019-12-23 13:46:52 +0000] [20] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
import(module)
File "/home/mind/app.py", line 144, in
model_service = class_defs[0](model_name, model_path)
File "/home/mind/model/customize_service.py", line 30, in init
self.model.eval()
AttributeError: 'collections.OrderedDict' object has no attribute 'eval'

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.