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

Fixed imports to run with tensorflow 2.3.1 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion muzero/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import collections
from typing import Optional, Dict

import tensorflow_core as tf
import tensorflow as tf

from game.cartpole import CartPole
from game.game import AbstractGame
Expand Down
6 changes: 3 additions & 3 deletions muzero/networks/cartpole_network.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import math

import numpy as np
from tensorflow_core.python.keras import regularizers
from tensorflow_core.python.keras.layers.core import Dense
from tensorflow_core.python.keras.models import Sequential
from tensorflow.keras import regularizers
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential

from game.game import Action
from networks.network import BaseNetwork
Expand Down
2 changes: 1 addition & 1 deletion muzero/networks/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Dict, List, Callable

import numpy as np
from tensorflow_core.python.keras.models import Model
from tensorflow.keras.models import Model

from game.game import Action

Expand Down
2 changes: 1 addition & 1 deletion muzero/networks/shared_storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import tensorflow_core as tf
import tensorflow as tf

from networks.network import BaseNetwork, UniformNetwork, AbstractNetwork

Expand Down
4 changes: 2 additions & 2 deletions muzero/training/training.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Training module: this is where MuZero neurons are trained."""

import numpy as np
import tensorflow_core as tf
from tensorflow_core.python.keras.losses import MSE
import tensorflow as tf
from tensorflow.keras.losses import MSE

from config import MuZeroConfig
from networks.network import BaseNetwork
Expand Down