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

Install issue - which version of tensorflow is tested? #3

Open
RoydenClark opened this issue Feb 13, 2018 · 1 comment
Open

Install issue - which version of tensorflow is tested? #3

RoydenClark opened this issue Feb 13, 2018 · 1 comment

Comments

@RoydenClark
Copy link

Which version of tensorflow has this software been tested against?

When trying to install this software package I ran into the following : WARNING:tensorflow:From build/bdist.linux-x86_64/egg/dietnet/network.py:135: mean_squared_error (from tensorflow.contrib.losses.python.losses.loss_ops) is deprecated and will be removed after 2016-12-30.
Instructions for updating:
Use tf.losses.mean_squared_error instead.
Traceback (most recent call last):
File "/ri/shared/modules/dietnet/Jun17_2017/bin/dietnet", line 11, in
load_entry_point('dietnet==0.1', 'console_scripts', 'dietnet')()
File "build/bdist.linux-x86_64/egg/dietnet/main.py", line 121, in main
File "build/bdist.linux-x86_64/egg/dietnet/train.py", line 47, in train
File "build/bdist.linux-x86_64/egg/dietnet/network.py", line 135, in diet
File "/ri/shared/modules/dietnet/Jun17_2017/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 136, in new_func
return func(*args, **kwargs)
TypeError: mean_squared_error() got an unexpected keyword argument 'weight'

Looking at current versions of tensorflow :
https://www.tensorflow.org/api_docs/python/tf/losses/mean_squared_error
mean_squared_error(
labels,
predictions,
weights=1.0,
scope=None,
loss_collection=tf.GraphKeys.LOSSES,
reduction=Reduction.SUM_BY_NONZERO_WEIGHTS
)

On a whim I tried modifying
mean_squared_loss = slim.losses.mean_squared_error(xhat,
inputs,
weight=gamma)

to
mean_squared_loss = slim.losses.mean_squared_error(xhat,
inputs,
weights=gamma)

And it seems to work.
.

@taneishi
Copy link

Same error and on tf==1.10 it's not work.
Use tf.losses.mean_squared_error() and softmax_cross_entropy() and rename weight to weights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants