Coder Social home page Coder Social logo

text_style_transfer's People

Contributors

fuzhenxin 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

Watchers

 avatar  avatar  avatar  avatar

text_style_transfer's Issues

README

Hi, could you update the README with possible initial experiments to start with, specifically differentiating how to use with different parameters for train and inference times (for both the multi-decoder and style-embedding setup). Thanks!

Could you please provide some training details?

Hello, thanks for sharing the source code and I think your work is very interesting. However, I try the source code you provide with default hyper-parameters, and I can hardly replicate the experiment in your paper. I think it is probably because there is something wrong in my experiment, and I wonder if you could provide some training details of your work.

empty output

Hi, I encountered a problem of testing the model. I trained and tested the model on one corpus, the generated outputs are normal strings.
While I switch to another one, the generated outputs are always empty strings. The training data is all fine without empty lines.
Do you have any idea about this problem?

running errors

Hi I running into errors when training the model, the running log is following:


Loading data
Building model
Building sampler
Building f_init... Done
Building f_next.. Done
Building f_init... Done
Building f_next.. Done
Building f_log_probs... Done
Building f_cost... Done
Computing gradient... Done
Traceback (most recent call last):
File "train_nmt.py", line 55, in
'reload': [False]})
File "train_nmt.py", line 42, in main
style_adv=True)
File "/text_style_transfer/model/style_transfer/session_multi_decoder/nmt.py", line 1126, in train
f_grad_shared0, f_update0 = eval(optimizer)(lr, tparams, grads0, inps1, cost0, cost_d, co
st_h, "0")
File "
/text_style_transfer/model/style_transfer/session_multi_decoder/nmt.py", line 898, in adadelta
profile=profile)
File "/.local/lib/python2.7/site-packages/theano/compile/function.py", line 317, in function
output_keys=output_keys)
File "
/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 449, i
n pfunc
no_default_updates=no_default_updates)
File "~/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 208, i
n rebuild_collect_shared
raise TypeError(err_msg, err_sug)
TypeError: ('An update must have the same type as the original shared variable (shared_var=We
mb_encoder_rgrad2_0, shared_var.type=TensorType(float32, matrix), update_val=Elemwise{add,no_
inplace}.0, update_val.type=TensorType(float64, matrix)).', 'If the difference is related to
the broadcast pattern, you can call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) f
unction to remove broadcastable dimensions.')


Any ideas about the error?

Running code with custom dataset

Dear authors, thanks for your work and for sharing the code!
I'm trying to run the code with a custom dataset but for some strange reasons it seems it processes only one batch from the training dataset.
These are the steps I followed to use the custom dataset:

  1. For each dataset split, I have two .txt files, one for each style. I concatenated them (let's say [train|dev|test].txt) and created the files with the style label information (let's say [train|dev|test]_label.txt)
  2. I ran the get_dic.py script giving train.txt as input

Am I doing right? Or did I miss or misunderstand something?
When I run the train_nmt.py script, what I noticed is that it processes only one training batch per epoch but I can't spot the error.
Thanks for your help

About file structure

From my understanding, there are only two models in the paper, namely the session_multi_decoder folder and session_style folder. What is the session_auto_encoder folder for? Because I found that the files in the session_auto_encoder folder are also modified compared to dl4mt-tutorial

GpuArrayException: cuMemAlloc: CUDA_ERROR_OUT_OF_MEMORY: out of memory

hi,
when I run the train.sh on GPU, I met the following errors:
Traceback (most recent call last): File "./train_nmt.py", line 55, in <module> 'reload': [False]}) File "./train_nmt.py", line 42, in main style_adv=True) File "model/style_transfer/session_multi_decoder/nmt.py", line 1176, in train cost, cost_d, cost_h = f_grad_shared[senti_index](x, x_mask, y, y_mask, senti) File "Theano/theano/compile/function_module.py", line 917, in __call__ storage_map=getattr(self.fn, 'storage_map', None)) File "Theano/theano/gof/link.py", line 325, in raise_with_op reraise(exc_type, exc_value, exc_trace) File "Theano/theano/compile/function_module.py", line 903, in __call__ self.fn() if output_subset is None else\ File "pygpu/gpuarray.pyx", line 700, in pygpu.gpuarray.pygpu_empty File "pygpu/gpuarray.pyx", line 301, in pygpu.gpuarray.array_empty GpuArrayException: cuMemAlloc: CUDA_ERROR_OUT_OF_MEMORY: out of memory
The GPU memory is 12G, but I think may be it is enough, can you help me? thanks!

Error when running train.sh

when running train.sh, it came up with a error:

Traceback (most recent call last):‘
  File "./train_nmt.py", line 4, in <module>
    from nmt import train
  File "/home/tyt/style-trans/text_style_transfer-master/model/style_transfer/session_multi_decoder/nmt.py", line 4, in <module>
    import theano
  File "/usr/local/lib/python2.7/dist-packages/theano/__init__.py", line 111, in <module>
    theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
  File "/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/tests/test_driver.py", line 39, in test_nvidia_driver1
    raise Exception("The nvidia driver version installed with this OS "
Exception: The nvidia driver version installed with this OS does not give good results for reduction.Installing the nvidia driver available on the same download page as the cuda package will fix the problem: http://developer.nvidia.com/cuda-downloads

I think it's something wrong with theano or cuda, but I don't know how to fix it.

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.