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

ImportError: cannot import name 'mse' #22

Open
Guo-Youtian opened this issue Mar 20, 2019 · 2 comments
Open

ImportError: cannot import name 'mse' #22

Guo-Youtian opened this issue Mar 20, 2019 · 2 comments

Comments

@Guo-Youtian
Copy link

$ python train_mineral_shards.py --algorithm=a2c
/home/guoyoutian/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "train_mineral_shards.py", line 15, in
from a2c import a2c
File "/home/guoyoutian/PycharmProjects/pysc2-examples-master/a2c/a2c.py", line 12, in
from baselines.a2c.utils import cat_entropy, mse
ImportError: cannot import name 'mse'

@XuJing1022
Copy link

Hi, I met the same bug. Whether did you solve it later? thx

@divyavanmahajan
Copy link
Contributor

divyavanmahajan commented May 12, 2019

The baselines.a2c.util does not have a "mse" function. So edit a2c/a2c.py

Line 12: REMOVE ,mse
from baselines.a2c.utils import cat_entropy, mse

Line 27: Add these two lines to define the missing mse function

def mse(pred, target):
  return tf.square(pred-target)/2.

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

3 participants