Coder Social home page Coder Social logo

img2poem's People

Contributors

bei21 avatar fdzzy avatar wkcn 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

img2poem's Issues

RuntimeError running test.py

Loading Extracting Feature Module...
Loading Extracting Feature Module...
Traceback (most recent call last):
File "", line 1, in
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 106, in spawn_main
exitcode = _main(fd)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 115, in _main
prepare(preparation_data)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 226, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 278, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users-\Anaconda3\envs\py35\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users-\Anaconda3\envs\py35\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users-\Anaconda3\envs\py35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users-\Downloads\img2poem-master\code\src\test.py", line 7, in
extract_feature = nn_process.create('extract_feature')
File "C:\Users-\Downloads\img2poem-master\code\src\nn_process.py", line 19, in create
proc.start()
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\context.py", line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\context.py", line 313, in _Popen
return Popen(process_obj)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\popen_spawn_win32.py", line 34, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 144, in get_preparation_data
_check_not_importing_main()
File "C:\Users-\Anaconda3\envs\py35\lib\multiprocessing\spawn.py", line 137, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

MXNetError: Cannot find argument 'flatten'

Super interesting work!

I am getting this error when I try to run the test script. I can't seem to find the problem in other mxnet repos. I installed mxnet with pip install mxnet-cu90 for cuda 9.0.

$ python test.py
Loading Extracting Feature Module...
Process Process-1:
Traceback (most recent call last):
  File "/mnt/drive1/tools/anaconda2/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/mnt/drive1/tools/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/mnt/drive3/gene/img2poem/code/src/nn_process.py", line 6, in pipe_process
    lib = importlib.import_module(module_name)
  File "/mnt/drive1/tools/anaconda2/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/mnt/drive3/gene/img2poem/code/src/extract_feature.py", line 56, in <module>
    object_model = get_mod()
  File "/mnt/drive3/gene/img2poem/code/src/extract_feature.py", line 41, in get_mod
    (3, 512)])
  File "/mnt/drive3/gene/img2poem/code/src/vgg_mx/symbol_vgg.py", line 26, in get_symbol
    x = mx.sym.FullyConnected(data = x, num_hidden = 4096, flatten = True, name = 'fc6')
  File "/home/gene/.local/lib/python2.7/site-packages/mxnet/_ctypes/symbol.py", line 181, in creator
    ctypes.byref(sym_handle)))
  File "/home/gene/.local/lib/python2.7/site-packages/mxnet/base.py", line 84, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
MXNetError: Cannot find argument 'flatten', Possible Arguments:
----------------
num_hidden : int, required
    Number of hidden nodes of the output.
no_bias : boolean, optional, default=False
    Whether to disable bias parameter.
, in operator FullyConnected(name="", flatten="True", num_hidden="4096")

AttributeError: Can't pickle local object 'create.<locals>.pipe_process' in WIndow 10

run the test in the window 10.Error is:

Loading Extracting Feature Module...
Traceback (most recent call last):
File "../img2poem/code/src/test.py", line 7, in
extract_feature = nn_process.create('extract_feature')
File "..\img2poem\code\src\nn_process.py", line 19, in create
proc.start()
File "D:\ProgramData\Anaconda3\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 89, in init
reduction.dump(process_obj, to_child)
File "D:\ProgramData\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'create..pipe_process

RuntimeError: attempt has been made to start new process before current process has finished

Hi there!

Trying to get the code running on a M1 mac. I am running the command 'python test.py test.jpg' (after putting a test.png in the code/src folder).
I am getting this runtime error:

RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

What is going wrong?

Thank you very much!

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.