Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: softmax() got an unexpected keyword argument 'axis' #40

Open
yulisaama opened this issue Sep 11, 2019 · 1 comment
Open

TypeError: softmax() got an unexpected keyword argument 'axis' #40

yulisaama opened this issue Sep 11, 2019 · 1 comment
Assignees
Labels
pending review this issue needs to be further reviewed, so work cannot be started

Comments

@yulisaama
Copy link

yulisaama commented Sep 11, 2019

So I have Tensorflow version 1.14.0 installed, and this issue is somehow related to different versions. Can TGAN point out which packages and version they are using? Or is there a different approach to solve this issue? Thanks in advance.

[0911 08:47:31 @input_source.py:223] Setting up the queue 'QueueInput/input_queue' for CPU prefetching ...
[0911 08:47:31 @registry.py:90] 'gen/LSTM/00/FC': [200, 100] --> [200, 100]
[0911 08:47:31 @registry.py:90] 'gen/LSTM/00/FC2': [200, 100] --> [200, 1]
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-437682dbdfa1> in <module>()
----> 1 tgan.fit(data)

~/celgene/TGAN-master/tgan/model.py in fit(self, data)
    688         trainer = GANTrainer(
    689             model=self.model,
--> 690             input_queue=input_queue,
    691         )
    692 

~/celgene/TGAN-master/tgan/trainer.py in __init__(self, model, input_queue)
     34         self.tower_func = TowerFuncWrapper(model.build_graph, inputs_desc)
     35         with TowerContext('', is_training=True):
---> 36             self.tower_func(*input_queue.get_input_tensors())
     37 
     38         opt = model.get_optimizer()

~/packages/anaconda3/lib/python3.6/site-packages/tensorpack/tfutils/tower.py in __call__(self, *args)
    288         ctx = get_current_tower_context()
    289         assert ctx is not None, "Function must be called under TowerContext!"
--> 290         output = self._tower_fn(*args)
    291         handle = TowerTensorHandle(ctx, args, output, self._input_signature)
    292         self._handles.append(handle)

~/celgene/TGAN-master/tgan/model.py in build_graph(self, *inputs)
    459 
    460         with tf.variable_scope('gen'):
--> 461             vecs_gen = self.generator(z)
    462 
    463             vecs_denorm = []

~/celgene/TGAN-master/tgan/model.py in generator(self, z)
    280                         input = tf.concat([h, z], axis=1)
    281                         attw = tf.get_variable("attw", shape=(len(states), 1, 1))
--> 282                         attw = tf.nn.softmax(attw, axis=0)
    283                         attention = tf.reduce_sum(tf.stack(states, axis=0) * attw, axis=0)
    284 

TypeError: softmax() got an unexpected keyword argument 'axis'
@csala
Copy link
Contributor

csala commented Sep 16, 2019

Hi @yulisaama You can see the version dependency specifications in the https://github.com/DAI-Lab/TGAN/blob/master/setup.py

Also, when TGAN was released, the latest tensorflow version was 1.13.1, so this should work without issues.
Version 1.14.0 was released afterwards, so they might have broken their API on that minor release.
We will investigate and restrict the dependency ranges accordingly.

@csala csala added the pending review this issue needs to be further reviewed, so work cannot be started label Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending review this issue needs to be further reviewed, so work cannot be started
Projects
None yet
Development

No branches or pull requests

3 participants