Skip to content

Commit 892d1fc

Browse files
committed
get the tensorflow to work with 64bit config
1 parent f4ca9b4 commit 892d1fc

File tree

10 files changed

+117
-18
lines changed

10 files changed

+117
-18
lines changed

csharp-au-to-mp3-converter/App.config

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
55
</startup>
6-
</configuration>
6+
</configuration>

csharp-au-to-mp3-converter/csharp-au-to-mp3-converter.csproj

+22-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<PlatformTarget>x64</PlatformTarget>
1718
<DebugSymbols>true</DebugSymbols>
1819
<DebugType>full</DebugType>
1920
<Optimize>false</Optimize>
@@ -31,6 +32,26 @@
3132
<ErrorReport>prompt</ErrorReport>
3233
<WarningLevel>4</WarningLevel>
3334
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
36+
<DebugSymbols>true</DebugSymbols>
37+
<OutputPath>bin\x64\Debug\</OutputPath>
38+
<DefineConstants>DEBUG;TRACE</DefineConstants>
39+
<DebugType>full</DebugType>
40+
<PlatformTarget>x64</PlatformTarget>
41+
<ErrorReport>prompt</ErrorReport>
42+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43+
<Prefer32Bit>true</Prefer32Bit>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
46+
<OutputPath>bin\x64\Release\</OutputPath>
47+
<DefineConstants>TRACE</DefineConstants>
48+
<Optimize>true</Optimize>
49+
<DebugType>pdbonly</DebugType>
50+
<PlatformTarget>x64</PlatformTarget>
51+
<ErrorReport>prompt</ErrorReport>
52+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
53+
<Prefer32Bit>true</Prefer32Bit>
54+
</PropertyGroup>
3455
<ItemGroup>
3556
<Reference Include="System" />
3657
<Reference Include="System.Core" />
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
55
</startup>
6-
</configuration>
6+
</configuration>

csharp-deep-learning-audio-samples/Program.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Program
1313
{
1414
static void Main(string[] args)
1515
{
16-
MelSpectrogram gram = new MelSpectrogram();
16+
Cifar10AudioClassifier c = new Cifar10AudioClassifier();
1717
string dataDirPath = @"C:\Users\chen0\git\csharp-deep-learning-audio\gtzan\genres";
1818

1919
string[] subDirectories = Directory.GetDirectories(dataDirPath);
@@ -22,9 +22,8 @@ static void Main(string[] args)
2222
string[] files = Directory.GetFiles(subDirectory, "*.au");
2323
foreach(string file in files)
2424
{
25-
Console.WriteLine("Converting: {0}", file);
26-
Bitmap img = gram.Convert(file, 48);
27-
img.Save(file + ".png");
25+
Console.WriteLine("classifing: {0}", file);
26+
c.PredictClass(file);
2827
}
2928

3029
}

csharp-deep-learning-audio-samples/csharp-deep-learning-audio-samples.csproj

+23-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>csharp_deep_learning_audio_samples</RootNamespace>
1111
<AssemblyName>csharp-deep-learning-audio-samples</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<TargetFrameworkProfile />
1516
</PropertyGroup>
1617
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<PlatformTarget>x64</PlatformTarget>
1819
<DebugSymbols>true</DebugSymbols>
1920
<DebugType>full</DebugType>
2021
<Optimize>false</Optimize>
@@ -32,6 +33,26 @@
3233
<ErrorReport>prompt</ErrorReport>
3334
<WarningLevel>4</WarningLevel>
3435
</PropertyGroup>
36+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
37+
<DebugSymbols>true</DebugSymbols>
38+
<OutputPath>bin\x64\Debug\</OutputPath>
39+
<DefineConstants>DEBUG;TRACE</DefineConstants>
40+
<DebugType>full</DebugType>
41+
<PlatformTarget>x64</PlatformTarget>
42+
<ErrorReport>prompt</ErrorReport>
43+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
44+
<Prefer32Bit>true</Prefer32Bit>
45+
</PropertyGroup>
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
47+
<OutputPath>bin\x64\Release\</OutputPath>
48+
<DefineConstants>TRACE</DefineConstants>
49+
<Optimize>true</Optimize>
50+
<DebugType>pdbonly</DebugType>
51+
<PlatformTarget>x64</PlatformTarget>
52+
<ErrorReport>prompt</ErrorReport>
53+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
54+
<Prefer32Bit>true</Prefer32Bit>
55+
</PropertyGroup>
3556
<ItemGroup>
3657
<Reference Include="System" />
3758
<Reference Include="System.Core" />

csharp-deep-learning-audio.sln

+18
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,43 @@ EndProject
1414
Global
1515
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1616
Debug|Any CPU = Debug|Any CPU
17+
Debug|x64 = Debug|x64
1718
Release|Any CPU = Release|Any CPU
19+
Release|x64 = Release|x64
1820
EndGlobalSection
1921
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2022
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2123
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Debug|x64.ActiveCfg = Debug|x64
25+
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Debug|x64.Build.0 = Debug|x64
2226
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
2327
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Release|x64.ActiveCfg = Release|Any CPU
29+
{463D7468-8B0D-49B7-9581-8A3E994066EA}.Release|x64.Build.0 = Release|Any CPU
2430
{A2299410-3211-4FFE-9894-DDA2426E1653}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2531
{A2299410-3211-4FFE-9894-DDA2426E1653}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{A2299410-3211-4FFE-9894-DDA2426E1653}.Debug|x64.ActiveCfg = Debug|x64
33+
{A2299410-3211-4FFE-9894-DDA2426E1653}.Debug|x64.Build.0 = Debug|x64
2634
{A2299410-3211-4FFE-9894-DDA2426E1653}.Release|Any CPU.ActiveCfg = Release|Any CPU
2735
{A2299410-3211-4FFE-9894-DDA2426E1653}.Release|Any CPU.Build.0 = Release|Any CPU
36+
{A2299410-3211-4FFE-9894-DDA2426E1653}.Release|x64.ActiveCfg = Release|Any CPU
37+
{A2299410-3211-4FFE-9894-DDA2426E1653}.Release|x64.Build.0 = Release|Any CPU
2838
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2939
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Debug|x64.ActiveCfg = Debug|x64
41+
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Debug|x64.Build.0 = Debug|x64
3042
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Release|Any CPU.ActiveCfg = Release|Any CPU
3143
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Release|x64.ActiveCfg = Release|Any CPU
45+
{8C80C4D8-A092-43F0-B8B2-3036B015A598}.Release|x64.Build.0 = Release|Any CPU
3246
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3347
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Debug|x64.ActiveCfg = Debug|x64
49+
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Debug|x64.Build.0 = Debug|x64
3450
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
3551
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Release|x64.ActiveCfg = Release|x64
53+
{59A34D95-FAE3-4E01-9716-3ADCF0221CCB}.Release|x64.Build.0 = Release|x64
3654
EndGlobalSection
3755
GlobalSection(SolutionProperties) = preSolution
3856
HideSolutionNode = FALSE
129 KB
Binary file not shown.

csharp-deep-learning-audio/csharp-deep-learning-audio.csproj

+20-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>csharp_deep_learning_audio</RootNamespace>
1111
<AssemblyName>csharp-deep-learning-audio</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
@@ -23,6 +23,7 @@
2323
<DefineConstants>DEBUG;TRACE</DefineConstants>
2424
<ErrorReport>prompt</ErrorReport>
2525
<WarningLevel>4</WarningLevel>
26+
<PlatformTarget>x64</PlatformTarget>
2627
</PropertyGroup>
2728
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2829
<DebugType>pdbonly</DebugType>
@@ -32,6 +33,24 @@
3233
<ErrorReport>prompt</ErrorReport>
3334
<WarningLevel>4</WarningLevel>
3435
</PropertyGroup>
36+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
37+
<DebugSymbols>true</DebugSymbols>
38+
<OutputPath>bin\x64\Debug\</OutputPath>
39+
<DefineConstants>DEBUG;TRACE</DefineConstants>
40+
<DebugType>full</DebugType>
41+
<PlatformTarget>x64</PlatformTarget>
42+
<ErrorReport>prompt</ErrorReport>
43+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
46+
<OutputPath>bin\x64\Release\</OutputPath>
47+
<DefineConstants>TRACE</DefineConstants>
48+
<Optimize>true</Optimize>
49+
<DebugType>pdbonly</DebugType>
50+
<PlatformTarget>x64</PlatformTarget>
51+
<ErrorReport>prompt</ErrorReport>
52+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
53+
</PropertyGroup>
3554
<ItemGroup>
3655
<Reference Include="Bass.Net, Version=2.4.10.3, Culture=neutral, PublicKeyToken=b7566c273e6ef480, processorArchitecture=MSIL">
3756
<HintPath>..\packages\Bass.Net.1.0.0\lib\Bass.Net.dll</HintPath>

csharp-melgram-generator/App.config

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
55
</startup>
6-
</configuration>
6+
</configuration>

csharp-melgram-generator/csharp-melgram-generator.csproj

+22-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<PlatformTarget>x64</PlatformTarget>
1718
<DebugSymbols>true</DebugSymbols>
1819
<DebugType>full</DebugType>
1920
<Optimize>false</Optimize>
@@ -31,6 +32,26 @@
3132
<ErrorReport>prompt</ErrorReport>
3233
<WarningLevel>4</WarningLevel>
3334
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
36+
<DebugSymbols>true</DebugSymbols>
37+
<OutputPath>bin\x64\Debug\</OutputPath>
38+
<DefineConstants>DEBUG;TRACE</DefineConstants>
39+
<DebugType>full</DebugType>
40+
<PlatformTarget>x64</PlatformTarget>
41+
<ErrorReport>prompt</ErrorReport>
42+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43+
<Prefer32Bit>true</Prefer32Bit>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
46+
<OutputPath>bin\x64\Release\</OutputPath>
47+
<DefineConstants>TRACE</DefineConstants>
48+
<Optimize>true</Optimize>
49+
<DebugType>pdbonly</DebugType>
50+
<PlatformTarget>x64</PlatformTarget>
51+
<ErrorReport>prompt</ErrorReport>
52+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
53+
<Prefer32Bit>true</Prefer32Bit>
54+
</PropertyGroup>
3455
<ItemGroup>
3556
<Reference Include="System" />
3657
<Reference Include="System.Core" />

0 commit comments

Comments
 (0)