Comments (2)
Hello, @stratospark !
I have an issue using flow_from_directory option to create a generator. When i'm tying to fit my model with the fit_generator(like this) model.fit_generator( train_generator, steps_per_epoch=samples_per_epoch, epochs=50, validation_data=validation_generator, callbacks=None, validation_steps=validation_steps)
i have theTypeError: process() missing 1 required positional argument : 'rng'
The fool error looks likee:
`TypeError Traceback (most recent call last)
in ()
5 validation_data=validation_generator,
6 callbacks=None,
----> 7 validation_steps=validation_steps)
/usr/local/lib/python3.5/dist-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
89 warnings.warn('Update your ' + object_name + 90 '
call to the Keras 2 API: ' + signature, stacklevel=2)
---> 91 return func(*args, **kwargs)
92 wrapper._original_function = func
93 return wrapper
/usr/local/lib/python3.5/dist-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
2190 batch_index = 0
2191 while steps_done < steps_per_epoch:
-> 2192 generator_output = next(output_generator)
2193
2194 if not hasattr(generator_output, 'len'):
/usr/local/lib/python3.5/dist-packages/keras/utils/data_utils.py in get(self)
791 success, value = self.queue.get()
792 if not success:
--> 793 six.reraise(value.class, value, value.traceback)
~/.local/lib/python3.5/site-packages/six.py in reraise(tp, value, tb)
691 if value.traceback is not tb:
692 raise value.with_traceback(tb)
--> 693 raise value
694 finally:
695 value = None
/usr/local/lib/python3.5/dist-packages/keras/utils/data_utils.py in _data_generator_task(self)
656 # => Serialize calls to
657 # infinite iterator/generator's next() function
--> 658 generator_output = next(self._generator)
659 self.queue.put((True, generator_output))
660 else:
~/photo_data/tools/image_gen_extended.py in next(self, *args, **kwargs)
664
665 def next(self, *args, **kwargs):
--> 666 return self.next(*args, **kwargs)
667
668 def process_image_worker(tup):
~/photo_data/tools/image_gen_extended.py in next(self)
903 if x.ndim == 2:
904 x = np.expand_dims(x, axis=0)
--> 905 x = self.image_data_generator.process(x)
906 if i == 0:
907 batch_x = np.zeros((current_batch_size,) + x.shape)
TypeError: process() missing 1 required positional argument: 'rng'`
Thank you in advance for your help!
from food-101-keras.
Hello, @stratospark !
I have an issue using flow_from_directory option to create a generator. When i'm tying to fit my model with the fit_generator(like this)model.fit_generator( train_generator, steps_per_epoch=samples_per_epoch, epochs=50, validation_data=validation_generator, callbacks=None, validation_steps=validation_steps)
i have theTypeError: process() missing 1 required positional argument : 'rng'
Hi, I had the same issue.
rng
in image_gen_extended.py
is just a random number generator: if you just set globally:
rng = np.random
everything should work.
from food-101-keras.
Related Issues (20)
- PicklingError: Can't pickle <type 'instancemethod'>: attribute lookup __builtin__.instancemethod failed HOT 1
- I want to know how the X_all.hdf5 data to get? HOT 3
- jupyter notebook stops without any warnings it shows processing but doesn't pull out any results even after several hours
- how to get X_all.hdf5 HOT 1
- How to get the model weights file that the code is using. Where can we download the weights for our use outside of your keras.js app HOT 2
- Indian Food Dataset HOT 2
- Improper config format while loading model. HOT 1
- Kernel Restart when loading the data into the variables HOT 2
- ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
- What is the content in the classes.txt file
- How to train the model
- ValueError: high is out of bounds for int32
- Saved model HOT 3
- About WISer
- Not working in tensorflow 2.1 HOT 1
- lost X_all.hdf5
- It's neccesary divide the folders?
- Pickling error on creating generators HOT 1
- Code is not consistent
- How to get the independent Probability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from food-101-keras.