Code Monkey home page Code Monkey logo

Comments (4)

chenjw851009 avatar chenjw851009 commented on May 19, 2024

the parameter "img_crop_dims=(224,224)",what do the parameter"*self.img_crop_dims"mean?

from image-quality-assessment.

chenjw851009 avatar chenjw851009 commented on May 19, 2024

I install keras of version 2.1.2, when I train my own model, some error report like this:

=================================================================
Total params: 3,239,114
Trainable params: 10,250
Non-trainable params: 3,228,864


train.py:83: UserWarning: Update your fit_generator call to the Keras 2 API: fit_generator(verbose=1, generator=<handlers...., workers=8, validation_data=<handlers...., epochs=25, callbacks=[<utils.ke..., max_queue_size=30, use_multiprocessing=True)
callbacks=[tensorboard, model_checkpointer])
Epoch 1/25
Traceback (most recent call last):
File "train.py", line 127, in
train(samples=samples, job_dir=job_dir, image_dir=image_dir, **config)
File "train.py", line 83, in train
callbacks=[tensorboard, model_checkpointer])
File "/usr/local/lib/python2.7/site-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/keras/engine/training.py", line 2115, in fit_generator
generator_output = next(output_generator)
File "/usr/local/lib/python2.7/site-packages/keras/utils/data_utils.py", line 557, in get
six.raise_from(StopIteration(e), e)
File "/usr/local/lib/python2.7/site-packages/six.py", line 737, in raise_from
raise value
StopIteration: 'module' object has no attribute 'image'

when I run train.py without docker, it ask two other files, "samples.json" and "config.json" ,I copy them from you have provided, but one para in the "config.json" is: "docker_image": "nima-cpu",

{
"train_env": "TID2013",
"s3_bucket": "ds-hotel-image-assessment",
"docker_image": "nima-cpu",
"base_model_name": "MobileNet",
"existing_weights": null,
"n_classes": 10,
"batch_size": 64,
"epochs_train_dense": 25,
"learning_rate_dense": 0.001,
"decay_dense": 0,
"epochs_train_all": 25,
"learning_rate_all": 0.0000003,
"decay_all": 0,
"dropout_rate": 0.75,
"multiprocessing_data_load": true,
"num_workers_data_load": 8,
"img_format": "bmp"
}
there are some para about docker, but I use python without docker, so what I should modify the config.json?? can you tell me how to do?
thanks very much!!!

from image-quality-assessment.

chenjw851009 avatar chenjw851009 commented on May 19, 2024

I have fixed this issue, but it seems that there is a bug in your source file code which named "data_generator.py",in the line 39.
besides, I run the train.py successfully in the version tensorflow:1.12.0 ,Keras:2.1.6 and python:2.7.12.
however, thanks very much.

from image-quality-assessment.

clennan avatar clennan commented on May 19, 2024

Hi, glad that you got the train.py script running. It seems all your issues are package version related, which is why I recommend to use the provided Docker images for training and predicting.

Line 39 in data_generator.py has no bug I believe, it works fine with the numpy version in the Docker image.

from image-quality-assessment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.