Skip to content
Advertisement

Tag: deep-learning

tf.train.Checkpoint is restoring or not?

I am running tensorflow 2.4 on colab. I tried to save the model using tf.train.Checkpoint() since it includes model subclassing, but after restoration I saw It didn’t restored any weights of my model. Here are few snippets: When I later restored it I didn’t get any gru weights: I also tried checkpoint.restore(manager.latest_checkpoint) but nothing changed. Is there any thing wrong

Pytorch crashes cuda on wrong line

How to see which python line causes a cuda crash down the line in Pytorch, which executes asynchronous code outside of the GIL? Here is a case where I had Pytorch crash cuda, running this code on this dataset and every run would crash with the debugger on a different python line, making it very difficult to debug. Answer I

converting xavier to glorot in tensorflow code

I am trying to convert xavier initializer in a tensorflow code to glorot initializer. I am not sure which one of the following (or other options) is correct? Answer Based on the code for xavier_initializer, the default is uniform=True which suggests glorot_uniform may be what you want. If you are using tf2, you may use tf.keras.initializers.GlorotUniform(). tf.keras.initializers.glorot_uniform is just a

Keras my_layer.output returning KerasTensor object instead of Tensor object (in custom loss function)

I’m trying to build a custom loss function in Keras v2.4.3: (as explained in this answer) But I think it’s behaving much different than expected (perhaps because of my Keras version?), I’m getting this error: And I think that’s because encoder.get_layer(‘mean’).output is returning a KerasTensor object instead of a tf.Tensor object (as the other answer indicates). What am I doing

Advertisement