When I try to run
lstm_fw_cell = rnn.BasicLSTMCell(num_hidden, forget_bias=1.0)
I get the error mentioned in the title.
Is this due to the tensorflow version? How to resolve this issue?
Try to replace rnn.BasicLSTMCell with tf.nn.rnn_cell.BasicLSTMCell. See more details here.
Your problem is due to conflicts between versions of Tensorflow. The rnn package interface is changing rapidly.
Check your version and the version of the API you are using.
Related
Here I want to use FinRL for crypto trading, while testing the FinRL's Crypto trading tutorial, bunch of error emerging. The environment I use is google colab, first problem is that the DRLAgent importing, finally I found the problem is version mismatch, so I keep testing, after days and nights, adjusting so many version, I face a error can't be solved. When the tutorial comes to training part
train(start_date=TRAIN_START_DATE,
end_date=TRAIN_END_DATE,
ticker_list=TICKER_LIST,
data_source='binance',
time_interval='5m',
technical_indicator_list=INDICATORS,
drl_lib='elegantrl',
env=env,
model_name='ppo',
current_working_dir='./test_ppo',
erl_params=ERL_PARAMS,
break_step=5e4,
if_vix=False
)
it indicate the line of if_vix error, assert error, so I try to modify the git clone version, but I can't adjust some of the package's version, so I gave up and asking for help
here is the colab I use: https://colab.research.google.com/drive/1Ro63lSqsH4IaLkVrHOH7XcNRM5tnY_Z-
sorry for my poor english and thanks for helping!!
package altering but
!pip install git+
can't change version
and the package inside the git also not anchored
also facing assert error, bunch of capability problem
I try to migrate my code from tf1.* to tf2, while in tf2 doc it says that tf.compat.v1.metrics.auc is deprecated because "The value of AUC returned by this may race with the update". This statement is vague to me. Does it mean that it can't be used in multithreading context? If not, in what situation can I use this function?
tf.compat.v1.metrics.auc has been moved under tf.keras.
As mentioned in the error message itself you can start using tf.keras.metrics.AUC in Tf2.
There are some changes in hyper parameters in the updated version, details with the example can be found in the above mentioned document.
I'm attempting to run the Minimal Stand-Alone Implementation of Federated Averaging from the TensorFlow Federated GitHub repository but receiving the following error in the server_update function:
AttributeError: module 'tensorflow_federated.python.common_libs.structure' has no attribute 'update_struct'
I have some old TensorFlow Federated code that uses the update_state function from the tff.utils package in place of update_struct() but according to a commit on GitHub this package is empty now. I'm using TensorFlow Federated version 0.18.0 and I also had the same problem trying on Google CoLab.
My question is how can I fix this error?
Thanks, any help appreciated.
I am assuming you hit the error you describe here.
It seems that the symbol is not in the 0.18 release. You can either depend on the nightly version (pip install tensorflow-federated-nightly), or modify the line to construct the new object directly, instead of using the update_struct helper. That is, the linked command could change to:
return ServerState(model_weights,
server_optimizer.variables(),
server_state.round_num + 1))
I am working on a project involving Google's TRAX package. I encountered the following error message while running a snippet of code on Jupyter notebook.
module 'trax.supervised' has no attribute 'inputs'
Is there a way around this issue? I have trax version 1.2.3.
Thanks!
As per trax documentation
The call must be trax.data rather than trax.Supervised
trax.data.inputs.add_loss_weights(generator, id_to_mask=None)
https://trax-ml.readthedocs.io/en/latest/trax.data.html
While executing udc_train.py of the chatbot-retrieval project from GitHub, I got this exception at the end of training steps and at the beginning of evaluations step. The problem seems that the following line of code returns None to the variable _set_ops:
_set_ops = loader.load_op_library(
resource_loader.get_path_to_datafile("_set_ops.so"))
I could found no _set_ops.so or so in tensorflow library folder.
Any suggestions to resolve this problem?
My runtime: Amazon EC2 GPU Windows Instance.
ANSWER:
Submitted this ticked to the github community of tensorflow and a new release has been build as a fix.
(I couldn't submit my answer since due to lack of StackOverflow badges. Anyone who is volunteer to submit this answer is more than welcome. I will approve it as the answer.)
OP found answer: This was a bug in TensowFlow that has now been fixed. All 1.0 and later builds of TensorFlow have this error corrected.