Coder Social home page Coder Social logo

oswaldoludwig / adversarial-learning-for-generative-conversational-agents Goto Github PK

View Code? Open in Web Editor NEW
77.0 11.0 27.0 937 KB

This repository contains a new adversarial training method for Generative Conversational Agents

Python 100.00%
nlp chatbot gan generative-adversarial-network seq2seq dialog adversarial-learning

adversarial-learning-for-generative-conversational-agents's People

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

adversarial-learning-for-generative-conversational-agents's Issues

Error when running the conversation_GAN.py

Traceback (most recent call last):
File "conversation_GAN.py", line 136, in
input_context = Input(shape=(maxlen_input,), dtype='int32', name='the context text')
File "/home/bala/.local/lib/python2.7/site-packages/keras/engine/input_layer.py", line 176, in Input
input_tensor=tensor)
File "/home/bala/.local/lib/python2.7/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/bala/.local/lib/python2.7/site-packages/keras/engine/input_layer.py", line 85, in init
name=self.name)
File "/home/bala/.local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 514, in placeholder
x = tf.placeholder(dtype, shape=shape, name=name)
File "/home/bala/.local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1808, in placeholder
return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name)
File "/home/bala/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 4848, in placeholder
"Placeholder", dtype=dtype, shape=shape, name=name)
File "/home/bala/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 394, in _apply_op_helper
with g.as_default(), ops.name_scope(name) as scope:
File "/home/bala/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 5982, in enter
return self._name_scope.enter()
File "/usr/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/home/bala/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 4105, in name_scope
raise ValueError("'%s' is not a valid scope name" % name)
ValueError: 'the context text' is not a valid scope name

Warning message with running conversation_GAN.py

Every time I tried conversation_GAN.py, I got warning message "2021-06-13 08:20:38.760895: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)"

2021-06-13 08:20:18.974838: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
Starting the model...
2021-06-13 08:20:27.346569: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-06-13 08:20:27.348320: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
2021-06-13 08:20:28.657984: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1660 Ti computeCapability: 7.5
coreClock: 1.59GHz coreCount: 24 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 268.26GiB/s
2021-06-13 08:20:28.658324: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2021-06-13 08:20:28.678067: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2021-06-13 08:20:28.678321: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2021-06-13 08:20:28.688924: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2021-06-13 08:20:28.691826: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2021-06-13 08:20:28.694202: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found
2021-06-13 08:20:28.704387: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2021-06-13 08:20:28.706130: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2021-06-13 08:20:28.706359: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-06-13 08:20:28.708451: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-06-13 08:20:28.711031: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-06-13 08:20:28.713796: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]
2021-06-13 08:20:28.715081: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set

CHAT:

computer: hi ! please type your name.

user: jack
computer: hi , jack ! My name is john.

user: hello john
2021-06-13 08:20:38.760895: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)

computer: good morning . can i help you ?
user: can you help me cleaning my room?

computer: yes , please . it is not dirty .
user:

not an issue - GAN vs chatterbot / ai bot architecture

I threw this code together which launches the chatterbot code directly against your trained model.
pip install git+git://github.com/gunthercox/ChatterBot.git

https://gist.github.com/johndpope/b0d9a025c6e54dc1e07ab6100c34a24a
screen shot 2018-06-29 at 9 54 16 am

the results were quite bad.

screen shot 2018-06-29 at 9 55 03 am

there's a bunch of yml files in chatterbot which if I get time will attempt to glue together - but it would be good to be able to have an api into this architecture where it could be corrected...or maybe that exists in codebase?

I understand this repo is to showcase whitepaper research - but wondered if you have ideas to take ai bots to another level. If you were to step back - and look at higher level of what could be achieved with blending technologies.

off the back of an envelope - some thoughts of mine
eg. by doing entity detection on sentence / have these carry forward
memory of stuff (I guess this opens up problems like microsoft's disastrous tai tai twitter bot)
eg. use elmo for understanding context of words
wikidata -> don't stop at entity detection / go beyond to understand meaning sentence.
use hybrid code network / action templates
Commonsense Knowledge

what do you see as the biggest challenge that needs solving?

List of versions

Could you please list versions of the packages that you use in this project? I saw in another issue that it requires Python 2, but what about other stuff (e.g., Keras)?

tried running conversation_GAN.py . gave error.

File "conversation_GAN.py", line 96
if raw_word[-1] <> '!' and raw_word[-1] <> '?' and raw_word[-1] <> '.' and raw_word[-2:] <> '! ' and raw_word[-2:] <> '? ' and raw_word[-2:] <> '. ':
^
SyntaxError: invalid syntax

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.