Closed SCKnife closed 4 years ago
The above problem has been solved.But I meet a new problem: when I train the VAE by run"python -m vae.train --n-epochs 50 --verbose 0 --z-size 64 -f C:\Users\Administrator\Desktop\learning\record‘。it reports as follows:
raceback (most recent call last):
File "
Oh,finally。I found the key to the problem。The Process object can only be created under“if name == 'main'”。so I try to write the "vae\data_loader.py(Data_loader(start_process))"as follows:
def start_process(self):
print("loading....")
if __name__=='__main__':
start_process()
"""Start preprocessing process"""
self.process = Process(target=self._run)
# Make it a deamon, so it will be deleted at the same time
# of the main process
self.process.daemon = True
self.process.start()
No errors occurs.But it seems not work corrrectly!Processing is always at 0% So what can I to make it correct? I'm desperate for help!
Yesterday,it works correctly! but today,when I run the train.py.it reports as follows: pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html ========== DonkeyVae-v0-level-0 sac ========== Loading VAE ... WARNING:tensorflow:From C:\Users\Administrator\Desktop\learning\vae\model.py:66: conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.conv2d instead. WARNING:tensorflow:From C:\ProgramData\Anaconda3\envs\Learning\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. WARNING:tensorflow:From C:\Users\Administrator\Desktop\learning\vae\model.py:74: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. WARNING:tensorflow:From C:\Users\Administrator\Desktop\learning\vae\model.py:88: conv2d_transpose (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.conv2d_transpose instead. 2020-01-12 10:35:19.513799: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 2020-01-12 10:35:19.519399: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 8. Tune using inter_op_parallelism_threads for best performance. Dim VAE = 32 train.py:66: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. hyperparams = yaml.load(f)[BASE_ENV] OrderedDict([('batch_size', 64), ('buffer_size', 30000), ('ent_coef', 'auto_0.1'), ('gamma', 0.99), ('gradient_steps', 600), ('learning_rate', 0.0003), ('learning_starts', 300), ('n_timesteps', 5000.0), ('policy', 'CustomSACPolicy'), ('train_freq', 3000), ('vae_path', 'C:\Users\Administrator\PycharmProjects\learning\learning\PKL\vae-level-0-dim-32.pkl'), ('z_size', 32), ('MIN_THROTTLE', 0.4), ('MAX_THROTTLE', 0.6), ('FRAME_SKIP', 1), ('MAX_CTE_ERROR', 2.0), ('N_COMMAND_HISTORY', 20), ('MAX_STEERING_DIFF', 0.15)]) Starting DonkeyGym env Traceback (most recent call last): File "train.py", line 117, in
env = DummyVecEnv([make_env(args.seed, vae=vae, teleop=args.teleop)])
File "C:\ProgramData\Anaconda3\envs\Learning\lib\site-packages\stable_baselines\common\vec_env\dummy_vec_env.py", line 20, in init
self.envs = [fn() for fn in env_fns]
File "C:\ProgramData\Anaconda3\envs\Learning\lib\site-packages\stable_baselines\common\vec_env\dummy_vec_env.py", line 20, in
self.envs = [fn() for fn in env_fns]
File "C:\Users\Administrator\Desktop\learning\utils\utils.py", line 121, in _init
n_stack=n_stack)
File "C:\Users\Administrator\Desktop\learning\donkey_gym\envs\vae_env.py", line 74, in init
self.unity_process.start(exe_path, headless=headless, port=port)
File "C:\Users\Administrator\Desktop\learning\donkey_gym\core\donkey_proc.py", line 32, in start
[sim_path] + port_args)
File "C:\ProgramData\Anaconda3\envs\Learning\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\ProgramData\Anaconda3\envs\Learning\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
PermissionError: [WinError 5] 拒绝访问。
I want to know how to slove the problem. please help!😊