Open clevilll opened 2 years ago
Hi,
If you run the code multiple times, it raises this error, because it doesn't overwrite the data inside a given group contained in the H5 file. So, you have two options:
replay = ReplayData(X, y, filename='hyperparms_in_action.h5', group_name='part1_001'
)
Hopefully this will solve your issue.Best, Daniel
Hi,
If you run the code multiple times, it raises this error, because it doesn't overwrite the data inside a given group contained in the H5 file. So, you have two options:
- delete the .h5 file and run it again
- change the group name every time you run the same code (
replay = ReplayData(X, y, filename='hyperparms_in_action.h5', group_name='part1_001'
) Hopefully this will solve your issue.Best, Daniel
Thanks for reply. I picked the 2nd option and replace following scripts to dynamically change the name when I run the cell:
import datetime as dt
dtime = dt.time()
now = dt.datetime.now()
zeit = now.strftime("%Y-%m-%d %H:%M:%S")
print(f"Last update of notebook:{zeit}")
X, y = load_data()
#replay = ReplayData(X, y, filename='hyperparms_in_action.h5', group_name='part1')
replay = ReplayData(X, y, filename='hyperparms_in_action.h5', group_name=f'part1_{zeit}')
but still, those errors mentioned in the issue remain and couldn't figure out what's wrong when I run them in Google colab notebook.
@dvgodoy is there any update from your side?
Hi,
The error you got Key Error: 'samples'
is the same one from issue #29, please follow the instructions I wrote there to downgrade some of the packages, then restart the kernel, and you should be able to run it.
Hope it helps. Best, Daniel
Hi, still can't solve it after downgrading. Please see the Google colab notebook.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-11-13c5c2ef98eb>](https://localhost:8080/#) in <module>
17 name='output'))
18 # Compile the model
---> 19 model.compile(loss='binary_crossentropy', optimizer=SGD(learning_rate=0.05), metrics=['acc'])
20
21 from deepreplay.callbacks import ReplayData
1 frames
[/usr/local/lib/python3.7/dist-packages/keras/engine/training.py](https://localhost:8080/#) in compile(self, optimizer, loss, metrics, loss_weights, sample_weight_mode, weighted_metrics, target_tensors, **kwargs)
92 `optimizer`, `loss`, `metrics` or `sample_weight_mode`.
93 """
---> 94 self.optimizer = optimizers.get(optimizer)
95 self.loss = loss or []
96 self.metrics = metrics or []
[/usr/local/lib/python3.7/dist-packages/keras/optimizers.py](https://localhost:8080/#) in get(identifier)
766 else:
767 raise ValueError('Could not interpret optimizer identifier: ' +
--> 768 str(identifier))
ValueError: Could not interpret optimizer identifier: <tensorflow.python.keras.optimizer_v2.gradient_descent.SGD object at 0x7fb0ce9413d0>
Hi recently I faced a problem when I used this package as its Traceback is following:
I shared the google colab notebook which I could run on Aug 2, 2019, but now it threw out this
KeyError: 'samples'
in 2021. Please check the notebook and feel free to run it for quick debugging.Following is the configuration and package versions in google colab:
This is the full code:
I found the similar open issues here & here related to saving model via hdf5 file. I tried based on some suggestions 12195# and here to save the model with
tf
instead ofh5
inreplay_filename
which was unsuccessful. There is lots of post in this regard in SoF Any helps will be highly appreciated.