the equivalent pytorch expression would be:
inputs.unsqueeze(dim=0).repeat(K, 1, 1)

As an alternative way, If you want to convert the tensorflow result to pytorch, depending on tensorflow version, you can either call .eval() (< tf 2.0) or .numpy() (>=tf 2.0) on the tensorflow result.