Skip to content

TypeError: softmax_loss_function() got an unexpected keyword argument 'logits' #32

@machuck

Description

@machuck

After running 2to3 -w on all the .py files, I got an error using python3.4 running the first example in the readme (train):

[] Building a NTM model
Percent: [####################] 100.00% Finished.
[
] Build a NTM model finished
[*] Reading checkpoints...
Traceback (most recent call last):
File "main.py", line 72, in
tf.app.run()
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "main.py", line 62, in main
task.run(ntm, int(FLAGS.test_max_length * 1 / 3), sess)
File "/home/can/NTM-tensorflow/tasks/copy.py", line 35, in run
[ntm.get_loss(seq_length)],
File "/home/can/NTM-tensorflow/ntm.py", line 206, in get_loss
softmax_loss_function=softmax_loss_function)
File "/usr/local/lib/python3.4/dist-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 1134, in sequence_loss
softmax_loss_function=softmax_loss_function))
File "/usr/local/lib/python3.4/dist-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 1089, in sequence_loss_by_example
crossent = softmax_loss_function(labels=target, logits=logit)
TypeError: softmax_loss_function() got an unexpected keyword argument 'logits'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions