Coder Social home page Coder Social logo

Comments (1)

HACLANG avatar HACLANG commented on July 29, 2024
(base) root@lang:~# pip show tensorflow-gpu
Name: tensorflow-gpu
Version: 2.2.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: /root/anaconda3/lib/python3.7/site-packages
Requires: keras-preprocessing, wheel, six, protobuf, tensorflow-estimator, wrapt, grpcio, google-pasta, h5py, absl-py, tensorboard, scipy, astunparse, opt-einsum, gast, termcolor, numpy
Required-b

and I changed some code to make it run on tensorflow 2.2:
/multi-agent-emergence-environments/ma_policy/load_policy.pyfile:

def load_policy(path, env=None, scope='policy'):
    '''
        Load a policy.
        Args:
            path (string): policy path
            env (Gym.Env): This will update the observation space of the
                policy that is returned
            scope (string): The base scope for the policy variables
    '''
    # TODO this will probably need to be changed when trying to run policy on GPU
    # try  change  tf.get_default_session  to  tf.compat.v1.get_default_session
    if tf.compat.v1.get_default_session() is None:
        # try  change  tf.ConfigProto  to  tf.compat.v1.ConfigProto
        tf_config = tf.compat.v1.ConfigProto(
            inter_op_parallelism_threads=1,
            intra_op_parallelism_threads=1)
        # try  change  tf.ConfigProto  to  tf.compat.v1.ConfigProto
        sess = tf.compat.v1.Session(config=tf_config)
        sess.__enter__()

from multi-agent-emergence-environments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.