I meet some wrong in model.py.
Here is my code:
from model import PopMusicTransformer
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
model = PopMusicTransformer(checkpoint='REMI-tempo-checkpoint', is_training=False)
And it turns out:
ValueError: Variable transformer/r_w_bias already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File "C:\Users\ailab502\anaconda3\envs\REMI\lib\site-packages\tensorflow\python\framework\ops.py", line 2005, in __init__
self._traceback = tf_stack.extract_stack()
File "C:\Users\ailab502\anaconda3\envs\REMI\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op
op_def=op_def)
File "C:\Users\ailab502\anaconda3\envs\REMI\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\Users\ailab502\anaconda3\envs\REMI\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "C:\Users\ailab502\anaconda3\envs\REMI\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 2023, in variable_v2
shared_name=shared_name, name=name)
I meet some wrong in model.py. Here is my code: from model import PopMusicTransformer import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' model = PopMusicTransformer(checkpoint='REMI-tempo-checkpoint', is_training=False)
And it turns out: ValueError: Variable transformer/r_w_bias already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
How can I fix this error?