加快Keras LSTM

时间:2018-07-04 02:07:06

标签: python-3.x tensorflow keras

我正在尝试使用Keras训练LSTM,但是训练非常慢(我使用的是GPU Nvidia Titan X)。有人知道我该如何加快训练速度吗?

非常感谢您

1 个答案:

答案 0 :(得分:6)

将标准awk ' { while(match($0,/[a-zA-Z]:/)){ val=(val?val:"")substr($0,RSTART,RLENGTH-1) $0=substr($0,RSTART+RLENGTH) } print val val="" }' Input_file 替换为import java.net.URISyntaxException; import java.security.InvalidKeyException; import com.microsoft.azure.storage.CloudStorageAccount; import com.microsoft.azure.storage.blob.CloudBlobClient; import com.microsoft.azure.storage.blob.CloudBlobContainer; import com.microsoft.azure.storage.blob.ListBlobItem; public class Main { public static final String ConnString="DefaultEndpointsProtocol=https;AccountName=xxxxx;AccountKey=O7xB6ebGq8e86XQSy2vkvSi/x/e9l9xxxxxxxxkly1DsQPYY5dF2JrAVHtBozbJo29ZrrGJA==;EndpointSuffix=core.windows.net"; public static void main(String[] args) { // TODO Auto-generated method stub listBlobsOfContainer("mycontainer"); System.out.println("Success"); } public static void listBlobsOfContainer(String containerName) { CloudStorageAccount account = null; CloudBlobContainer container = null; try { account = CloudStorageAccount.parse(ConnString); CloudBlobClient client = account.createCloudBlobClient(); container = client.getContainerReference(containerName); container.createIfNotExists(); }catch(Exception ex) { ex.printStackTrace(); } for (ListBlobItem blobItem : container.listBlobs()) { System.out.println("URI of blob is: " + blobItem.getUri()); } } } 。您可以从

导入
LSTM