keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.64k stars 19.42k forks source link

ModuleNotFoundError: No module named 'keras.utils.generic_utils' #19744

Closed rbbks closed 3 months ago

rbbks commented 4 months ago

I dont know why this code generate this error can you help me ???

from rl.agents import DQNAgent from rl.memory import SequentialMemory from rl.policy import LinearAnnealedPolicy, EpsGreedyQPolicy

def build_agent(model, actions): policy = LinearAnnealedPolicy(EpsGreedyQPolicy(), attr='eps', value_max=1., value_min=.1, value_test=.2, nb_steps=10000) memory = SequentialMemory(limit=1000, window_length=3) dqn = DQNAgent(model=model, memory=memory, policy=policy, enable_dueling_network=True, dueling_type='avg', nb_actions=actions, nb_steps_warmup=1000 ) return dqn

fchollet commented 4 months ago

That's a private namespace -- you cannot access it. Perhaps you meant to use keras.utils?

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 3 months ago

Are you satisfied with the resolution of your issue? Yes No