Open songyu3044 opened 5 years ago
I had the same problem, and when I added the following function definition which is from keras.preprocessing.image.ImageDataGenerator, the error was fixed.
def transform_matrix_offset_center(matrix, x, y): o_x = float(x) / 2 + 0.5 o_y = float(y) / 2 + 0.5 offset_matrix = np.array([[1, 0, o_x], [0, 1, o_y], [0, 0, 1]]) reset_matrix = np.array([[1, 0, -o_x], [0, 1, -o_y], [0, 0, 1]]) transform_matrix = np.dot(np.dot(offset_matrix, matrix), reset_matrix) return transform_matrix
Traceback (most recent call last):
File "train.py", line 237, in
I've solved this problem, but I'm sorry. I forgot how to solve it at that time. As I recall, you maybe install keras 2.1.6 or check keras-contrib is right. if you do this ,you cant solve it .you can add my wechat: zm2634039766
i meet this question NameError: name 'transform_matrix_offset_center' is not defined please help me