spateo-release
spateo-release copied to clipboard
PrinCurve_method needs specific tensorflow
st.tdr.models.models_backbone.backbone_methods.PrinCurve_method
run into errors with newest tensorflow
.
It's necessary to use tensorflow==2.11.0 keras==2.11
.
Error reports:
File ~/miniconda3/envs/spateo_updated/lib/python3.9/site-packages/spateo/tdr/models/models_backbone/backbone_methods.py:116, in NLPCA.create_model(self, num_dim, nodes, lr)
113 # Create layers:
114 # Function G
115 input = Input(shape=(num_dim,)) # input layer
--> 116 mapping = Dense(nodes, activation="sigmoid")(input) # mapping layer
117 bottle = Dense(1, activation="sigmoid")(mapping) # bottle-neck layer
119 # Function H
File ~/miniconda3/envs/spateo_updated/lib/python3.9/site-packages/keras/src/utils/traceback_utils.py:122, in filter_traceback.<locals>.error_handler(*args, **kwargs)
119 filtered_tb = _process_traceback_frames(e.__traceback__)
120 # To get the full stack trace, call:
121 # `keras.config.disable_traceback_filtering()`
--> 122 raise e.with_traceback(filtered_tb) from None
123 finally:
124 del filtered_tb
File ~/miniconda3/envs/spateo_updated/lib/python3.9/site-packages/keras/src/backend/tensorflow/random.py:19, in _cast_seed(seed)
17 return seed
18 else:
---> 19 seed = tf.cast(tf.math.floormod(seed, tf.int32.max - 1), dtype="int32")
20 return seed
InternalError: {{function_node __wrapped__FloorMod_device_/job:localhost/replica:0/task:0/device:GPU:0}} 'cuLaunchKernel(function, gridX, gridY, gridZ, blockX, blockY, blockZ, 0, reinterpret_cast<CUstream>(stream), params, nullptr)' failed with 'CUDA_ERROR_INVALID_HANDLE' [Op:FloorMod] name: