Closed MaryamGolchin closed 2 years ago
same error here
Same error here too. Running on Colab. Any answer?
Hi,
The error arises from the default versions used by Colab nowadays which are, unfortunately, not compatible with the code I wrote for DeepReplay years ago. If is still possible to run the examples, though, if you downgrade the versions of some packages.
Paste the lines below into a new cell, run it, and restart the kernel, and you should be able to run the examples.
!pip install keras==2.2.0
!pip install tensorflow==1.15.5
!pip install keras_applications==1.0.7
Hope it helps. Best, Daniel
Thanks, that fixed it. Luciano.
getting KeyError: 'samples' error when trying the sample code.
KeyError Traceback (most recent call last) c:\Users..modelling.py in
19 m.compile(loss='binary_crossentropy', optimizer=SGD(lr=0.05), metrics=['acc'])
20
---> 21 m.fit(xx, yy, epochs=150, batch_size=16, callbacks=[replaydata])
~\Documents\Programs\Anaconda3\envs\base\lib\site-packages\keras\utils\traceback_utils.py in error_handler(*args, **kwargs) 65 except Exception as e: # pylint: disable=broad-except 66 filtered_tb = _process_traceback_frames(e.traceback) ---> 67 raise e.with_traceback(filtered_tb) from None 68 finally: 69 del filtered_tb
~\Documents\Programs\Anaconda3\envs\base\lib\site-packages\deepreplay\callbacks.py in on_train_begin(self, logs) 84 85 self.group = self.handler.create_group(self.group_name) ---> 86 self.group.attrs['samples'] = self.params['samples'] 87 self.group.attrs['batch_size'] = self.params['batch_size'] 88 self.group.attrs['n_batches'] = (self.params['samples'] + self.params['batch_size'] - 1) // \
KeyError: 'samples'
Using coda, deepreplay version is 0.1.2a2 keras version is 2.4.0