當前位置: 華文問答 > 數碼

machine learning 在 Java 上的開發是不是已經沒落?

2020-01-21數碼

多□□多想不開才會在一個 很少動態分配記憶體、高度效能敏感 的場景下,去用一門既 不支持記憶體對齊、不支持SIMD、不支持直接存取驅動和硬件 ,又 沒有高度動態特性和靈活表達能力、泛型就是個殘廢、一半程式碼是interface定義、構造個Map都能把人寫死、連自動類別推理都才剛剛有 的語言?可能只有某些推崇連OpenCV都不會用的□□外國佬的人吧。

當然,比不上吹了半天java然後點進去是個Python專案這件事那麽□□。

附:一個20+行的影片播放器

import cv2 from time import time def play_video ( video ): v = cv2 . VideoCapture ( video ) fps = v . get ( cv2 . CAP_PROP_FPS ) img = None current_start = time () current_frames = 0 while True : r , img = v . read ( img ) if not r : break cv2 . imshow ( "player" , img ) current_frames += 1 next_time = current_start + current_frames / fps nc = cv2 . waitKey ( max ( int (( next_time - time ()) * 1000 ), 1 )) if nc == ord ( 'q' ): break v . release () cv2 . destroyWindow ( "player" ) # play_video('test.mp4') # From file # play_video(0) # From camera

評論區老哥們:你們要求不import也好,要求一行也好,Talk is cheap,show me the code,□□□□□□□□□□□□啊?