I think the best way is just to take the source code of the original model and then rewrite it in your target library. For the SimCLR implementation it will be following.

Coming to the second part of your question, unfortunately I have not found an equivalent of “model.summary()” method in tensorflow. But you can still try a couple of methods,

  1. run the original source code/model on your machine and visualize it on Tensorboard(write_graph = True)
  2. read the *meta file as discussed in the original article and print out the all the variable names.
 # get global variables (including model variables)
vars_global = tf.global_variables() sess.as_default()
for var in vars_global:

Please let me know if that answers your query.


Budding AI Researcher