Update model_vgg19.py
# limitations under the License.
#
-
def VGG19_Model(s, model_name='VGG19', n_channels=3, width=224, height=224,
random_crop=None, offsets=None, include_top=True):
'''
- VGG19 model definition
-
- Parameters
- ----------
- s : CAS
- Specifies the CAS connection object
- model_name : string, optional
- Specifies the name of CAS table to store the model
- n_channels : int, optional
- Specifies the number of the channels of the input layer
- Default: 3
- width : int, optional
- Specifies the width of the input layer
- Default: 224
- height : int, optional
- Specifies the height of the input layer
- Default: 224
- random_crop : string, optional
- Specifies how to crop the data in the input layer when image data is
- used. Images are cropped to the values that are specified in the width
- and height parameters. Only the images with one or both dimensions
- that are larger than those sizes are cropped.
- Valid Values: 'none' or 'UNIQUE'
- Default : 'UNIQUE'
- offsets : double or iter-of-doubles, optional
- Specifies an offset for each channel in the input data. The final
- input data is set after applying scaling and subtracting the
- specified offsets.
- Default: (103.939, 116.779, 123.68)
-
- Returns
- -------
- a CAS table defining the model is created.
- '''
+ VGG16 model definition
+ '''
+ # TODO: Document parameters
# TODO: Use underscore-delimited parameter names
# quick error-checking and default setting
if random_crop is None:
- random_crop = "NONE"
- elif random_crop.upper() not in ["NONE", "UNIQUE"]:
- raise ValueError('random_crop can only be "NONE" or "UNIQUE"')
+ random_crop = "none"
+ elif random_crop.lower() not in ["none", "unique"]:
+ raise ValueError('random_crop can only be "none" or "unique"')
if (offsets == None):
offsets = [103.939, 116.779, 123.68]
