前提・実現したいこと
モデル構築で結果を出力したいです
発生している問題・エラーメッセージ
エラーメッセージが表示されないので、実行結果を載せます
PS C:\Users\mori-soh> & C:/省略.py Using TensorFlow backend. PS C:\Users\mori-soh>
該当のソースコード
python
1#モデルの構築 2 3from keras import layers, models2 4 5model = models.Sequential() 6model.add(layers.Conv2D(32,(3,3),activation="relu",input_shape=(150,150,3))) 7model.add(layers.MaxPooling2D((2,2))) 8model.add(layers.Conv2D(64,(3,3),activation="relu")) 9model.add(layers.MaxPooling2D((2,2))) 10model.add(layers.Conv2D(128,(3,3),activation="relu")) 11model.add(layers.MaxPooling2D((2,2))) 12model.add(layers.Conv2D(128,(3,3),activation="relu")) 13model.add(layers.MaxPooling2D((2,2))) 14model.add(layers.Flatten()) 15model.add(layers.Dense(512,activation="relu")) 16model.add(layers.Dense(7,activation="sigmoid")) #分類先の種類分設定 17 18#モデル構成の確認 19model.summary()
試したこと
model.summary()のサンプルコードを調べて実行しましたが、結果に変わりはありませんでした
仮想環境を起動した際に通常と違う動きをしたので、このあたりが原因だと思っています。
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>python C:\Users\mori-soh\Anaconda3\envs\py36\etc\keras\load_config.py 1>temp.txt
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set /p KERAS_BACKEND= 0<temp.txt
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>del temp.txt
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>python -c "import keras" 1>nul 2>&1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if errorlevel 1 (
ver 1>nul
set "KERAS_BACKEND=theano"
python -c "import keras" 1>nul 2>&1
)
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>SET DISTUTILS_USE_SDK=1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>SET MSSdk=1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>SET "VS_VERSION=15.0"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>SET "VS_MAJOR=15"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>SET "VS_YEAR=2017"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set "MSYS2_ENV_CONV_EXCL=CL"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set "PY_VCRUNTIME_REDIST=\bin\vcruntime140.dll"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set "CXX=cl.exe"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set "CC=cl.exe"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>set "VSINSTALLDIR="
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>for /F "usebackq tokens=*" %i in (vswhere.exe -nologo -products * -version [15.0,16.0) -property installationPath
) do (set "VSINSTALLDIR=%i" )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>(set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" (for /F "usebackq tokens=*" %i in (vswhere.exe -nologo -products * -requires Microsoft.VisualStudio.Component.VC.v141.x86.x64 -property installationPath
) do (set "VSINSTALLDIR=%i" ) )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional" )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>IF NOT "" == "" (
set "INCLUDE=;"
set "LIB=;"
set "CMAKE_PREFIX_PATH=;"
)
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>call :GetWin10SdkDir
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node 1>nul 2>&1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node 1>nul 2>&1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE 1>nul 2>&1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE 1>nul 2>&1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if errorlevel 1 exit /B 1
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>exit /B 0
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>for /F %i in ('dir /ON /B "C:\Program Files (x86)\Windows Kits\10\include\10.*"') DO (SET WindowsSDKVer=%~i )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>(SET WindowsSDKVer=10.0.16299.0 )
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>if errorlevel 1 (echo "Didn't find any windows 10 SDK. I'm not sure if things will work, but let's try..." ) else (echo Windows SDK version found as: "10.0.16299.0" )
Windows SDK version found as: "10.0.16299.0"
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>IF "win-64" == "win-64" (
set "CMAKE_GEN=Visual Studio 15 2017 Win64"
set "BITS=64"
) else (
set "CMAKE_GEN=Visual Studio 15 2017"
set "BITS=32"
)
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Users\mori-soh\Anaconda3\envs\py36\etc\conda\activate.d>pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
(C:\Users\mori-soh\Anaconda3\envs\py36) C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>CALL "VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.16 10.0.16299.0
** Visual Studio 2017 Developer Command Prompt v15.9.30
** Copyright (c) 2017 Microsoft Corporation
[vcvarsall.bat] Environment initialized for: 'x64'
補足情報(FW/ツールのバージョンなど)
あなたの回答
tips
プレビュー