Do not use deprecated `at::Tensor::type()`

Summary:
X-link: https://github.com/facebookexternal/vizard/pull/5

X-link: https://github.com/fairinternal/egohowto/pull/72

Pull Request resolved: https://github.com/facebookresearch/d2go/pull/680

Replace `tensor.type().scalarType()` with `tensor.scalar_type()` (this be able to get rid of the cast function in https://github.com/pytorch/pytorch/pull/139358 )

Remove extraneous braces around lambdas

Reviewed By: huydhn, r-barnes

Differential Revision: D65308547

fbshipit-source-id: d04c62cfa7361c0f69a2eaf1fd331befa9df4395
7 jobs for main in 0 seconds (queued for 65 minutes and 5 seconds)
Status Job ID Name Coverage
  Build
failed #17033
build

 
  Test
skipped #17036
allowed to fail
bandit-sast
failed #17035
allowed to fail
code_quality

skipped #17037
allowed to fail
flawfinder-sast
skipped #17039
allowed to fail
secret_detection
skipped #17038
allowed to fail
semgrep-sast
failed #17034
test

 
Name Stage Failure
failed
build Build There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job log
failed
test Test There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job log
failed
code_quality Test There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job log