samples is of type np.ndarray with a specific dtype. To create an array of numeric values, we need to import the array. toarray () returns an ndarray Max Kleiner. toarray () we enlarge it to an array of sequence. Hence, you're trying to set an array element with a sequence. 18:59:55 MainProcess _training_0 training_data _init_ DEBUG Initializing TrainingDataGenerator: (model_input_size: 320, model_output_shapes:, coverage_ratio: 0. 1 Answer Sorted by: 0 The line here: samples accepted x,y is the problem. The array module allows us to store a collection of numeric values. The value error means we're trying to load a n-element array (sequence) into a single number slot which only has a float. 18:59:55 MainProcess _training_0 _base coverage_ratio DEBUG Final coverage_ratio: 0.6875 18:59:55 MainProcess _training_0 _base coverage_ratio DEBUG Requested coverage_ratio: 0.6875 This part of the code shows that to refer to an array element, either to assign a value to it or to get its value, you append brackets to the array name. Python has a set of built-in methods that you can use on lists/arrays. Here is pseudocode that follows the sequence of interactions. You refer to an array element by referring to the index number. 18:59:55 MainProcess _training_0 _base _load_generator DEBUG input_size: 320, output_shapes: When you declare an array, each element of the array is set to a default initial value. Code: Select all 18:59:55 MainProcess _training_0 _base _load_generator DEBUG Loading generator
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |